return getRatio(this.intersection, pointA, pointB);
}
private static double getRatio(Point2D intersection, Point2D pointA, Point2D pointB) {
try {
Vector t1 = new Vector(pointA, intersection);
Vector t2 = new Vector(pointB, intersection);
double norm1 = Math.sqrt(t1.x * t1.x + t1.y * t1.y);
double norm2 = Math.sqrt(t2.x * t2.x + t2.y * t2.y);
return MathUtils.round(norm1 / norm2);