Issue 640. minor

This commit is contained in:
Victor Shcherb 2011-09-11 17:21:31 +02:00
parent 3852e55aa5
commit 52b14cc559

View file

@ -119,13 +119,13 @@ public class BinaryRoutePlanner {
// calculate distance from C to AB (distnace doesn't calculate
private static double calculateDistance(int xA, int yA, int xB, int yB, int xC, int yC, double distAB){
// Scalar multiplication between (AB', AC)
double multiple = (-convert31YToMeters(yB, yA)) * convert31XToMeters(xC,xA) + convert31XToMeters(xB,xA) * convert31YToMeters(yC, yA);
double multiple = (-convert31YToMeters(yB, yA)) * convert31XToMeters(xC,xA) + convert31YToMeters(xB,xA) * convert31YToMeters(yC, yA);
return multiple / distAB;
}
private static double calculateProjection(int xA, int yA, int xB, int yB, int xC, int yC, double distAB) {
// Scalar multiplication between (AB, AC)
double multiple = convert31XToMeters(xB, xA) * convert31XToMeters(xC, xA) + convert31XToMeters(yB, yA) * convert31YToMeters(yC, yA);
double multiple = convert31XToMeters(xB, xA) * convert31XToMeters(xC, xA) + convert31YToMeters(yB, yA) * convert31YToMeters(yC, yA);
return multiple / distAB;
}