yeah it does. which makes sense. its wrong but it makes sense
if anyones wondering my actual solution to this was to detect based on the velocity of the player, which is safer in the first place as it means if the player somehow goes faster than 4 pixels per tick it doesnt fail, and would work for the full 8
Gonna try some chicanery.
public int wrongRound(double number) {
int rounded = (int) number;
return (int) (2 * rounded - number + 1.5 - 1.0 / Integer.MAX_VALUE);
}
what is he cooking
Nope, Java does not like that.
the issue there is 8 being turned into 7.99999999 would like. make it round down no? we have entered a mystical realm where I no longer understand the math taking place
That’s the intention.
to make 8 round down to 7?
oh but the rounded number is the same
I cant do math in my head help
I almost exclusively do math in my head but I cannot keep track of anything. this is evil
what if you removed ALL comparisons from the program
…actually, I have no idea what I’m doing.
Carry on.
nono youre cooking actually. you get a 7.999 but the rounded number is still 8. Surely there is something here
like yeah it adds a harsher limit to the number of places and changes the functionality on .5 but there is smth here
ive done this before
did it actually run faster
i’ve tried something like this and it was slower
but there were also ways I could make it a lot better
this is true unironically
this is why the jonkler odesn’ die
the day i dont like this image is the day ive died (or i missed it or something)