8283848586878889909192
return p.sub(start); } else { Vector2D z = end.sub(start); Vector2D a = p.sub(start); double lb = a.dot(z)/z.length(); Vector2D b = z.normalize().setLength(lb); Vector2D c = a.sub(b); double lc = c.length()*(a.crossSign(z));