point having minimum distance from the point p
ind = 0 ; NEW_LINE n = len ( a ) NEW_LINE for i in range ( 1 , n ) : NEW_LINE INDENT if ( sqDist ( p , a [ i ] ) < sqDist ( p , a [ ind ] ) ) : NEW_LINE INDENT ind = i NEW_LINE DEDENT DEDENT