Continuity of metric projections