Hot answers tagged

1

It's common for negative zero to behave in unintuitive ways. Complicating things, I wasn't able to find an official doc detailing what sort of behavior a programmer should expect from Godot regarding negative zero. So the best suggestion I can offer is to special case -0 to behave as needed: func calculate_grid_position(): var tempX = int(round(position....


Only top voted, non community-wiki answers of a minimum length are eligible