First time i ever heard of -0 lmao
I have used floor(dir) but it failed to going to the right. The only code that work is
switch(floor(dir) { case floor(0): ...}
Apparently floor(-0) is still -0 (??), but round or int64 work.
floor(-0)
-0
round
int64
Yes it worked! I will use it as a workaround for now.