public static double distanceOrigin ( LineParametric2D_F64 line ) { double top = line . slope . y * line . p . x - line . slope . x * line . p . y ; return Math . abs ( top ) / line . slope . norm ( ) ; }
Returns the distance of the closest point on the line from the origin