code: public float distanceSquared(Vector2f point) {
  		getClosestPoint(point, closest);
  		closest.sub(point);
  
  		float result = closest.lengthSquared();
  
  		return result;
  	}
docs: Get the shortest distance squared from a point to this line
  
  @param point
  The point from which we want the distance
  @return The distance squared from the line to the point