public static double distanceSquared ( double [ ] pointA ) { double distance = 0.0 ; for ( int i = 0 ; i < pointA . length ; i ++ ) { distance += pointA [ i ] * pointA [ i ] ; } return distance ; }
Calculates the squared Euclidean length of a point .