This commit is contained in:
StylexTV 2023-08-26 21:11:04 +01:00 committed by GitHub
commit 922c0dd981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -33,11 +33,10 @@ public class GoalAxis implements Goal {
int x = Math.abs(x0);
int z = Math.abs(z0);
int shrt = Math.min(x, z);
int lng = Math.max(x, z);
int diff = lng - shrt;
int major = Math.min(x, z);
int minor = Math.abs(x - z);
double flatAxisDistance = Math.min(x, Math.min(z, diff * SQRT_2_OVER_2));
double flatAxisDistance = Math.min(major, minor * SQRT_2_OVER_2);
return flatAxisDistance * BaritoneAPI.getSettings().costHeuristic.value + GoalYLevel.calculate(BaritoneAPI.getSettings().axisHeight.value, y);
}