code: 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;
  	}
docs: Calculates the squared Euclidean length of a point.
  
  @param pointA
  point
  @return the squared Euclidean length