Issue 640. minor
This commit is contained in:
parent
3852e55aa5
commit
52b14cc559
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue