nl_tokens: <p > Returns the Euclidean distance squared of the closest point on the line from a point . < / p >
pl_tokens: public static double distanceSq ( LineParametric2D_F64 line , Point2D_F64 p ) { double scale = Math . <mask> ( Math . abs ( line . slope . x ) , Math . abs ( line . slope . y ) ) ; double t = ClosestPoint2D_F64 . closestPointT ( line , p , scale ) ; double a = ( line . slope . x / scale ) * t + line . p . x ; double b = ( line . slope . y / scale ) * t + line . p . y ; double dx = p . x - a ; double dy = p . y - b ; return dx * dx + dy * dy ; }