question: public static Point normalize ( Point p , double length ) { double len = Math . sqrt ( p . x * p . x + p . y * p . y ) ; length = length / len ; return new Point ( p . x * length , p . y * length ) ; }
target:  Normalize a point. Scales the line segment between (0,0) and the current point to a set length. For example, if the current point is (0,5), and you normalize it to 1, the point returned is at (0,1).