This commit is contained in:
Victor Shcherb 2020-03-27 18:33:33 +01:00
parent 3387a64130
commit 04ec715d95
2 changed files with 3 additions and 3 deletions

View file

@ -788,8 +788,8 @@ public class BinaryRoutePlanner {
TLongObjectHashMap<RouteSegment> visitedSegments, float distFromStart, float distanceToEnd, RouteSegment segment,
int segmentPoint, RouteSegment next) {
if (next != null) {
float obstaclesTime = (float) ctx.getRouter().calculateTurnTime(next, next.isPositive()?
next.getRoad().getPointsLength() - 1 : 0,
float obstaclesTime = (float) ctx.getRouter().calculateTurnTime(next,
next.isPositive() ? next.getRoad().getPointsLength() - 1 : 0,
segment, segmentPoint);
distFromStart += obstaclesTime;
if (TEST_SPECIFIC && next.road.getId() >> 6 == TEST_ID) {

View file

@ -580,7 +580,7 @@ public class GeneralRouter implements VehicleRouter {
// more like UT
if (diff > 2 * Math.PI / 3) {
return getLeftTurn();
} else if (diff > Math.PI / 2) {
} else if (diff > Math.PI / 3) {
return getRightTurn();
}
return 0;