Skip to content

Commit

Permalink
Surround addition with parentheses, fix #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Siro256 committed Jun 30, 2023
1 parent 6c26817 commit 0b3d7b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
int i = 0;
if (frontBogie != null && this.prevPosIndex != -1) {
- int j = (int)((speed + 0.25F) * 32.0F);
+ int j = (int)(Math.abs(speed) + 0.25F * SPLITS_PER_METER);
+ int j = (int)((Math.abs(speed) + 0.25F) * SPLITS_PER_METER);
int k = this.prevPosIndex - j;
int l = this.prevPosIndex + j;
int i1 = k < 0 ? 0 : k;
Expand Down

0 comments on commit 0b3d7b9

Please sign in to comment.