So i'm calculating some positions and my problem is that this line:
Mathf.Abs(Mathf.Round(pos.x * 100) / 100) % (4 * scale)
returns 115,6 where it should return 0 (115,6/115,6 should give 1). I thought it has to do with some calculation inaccuracies but when i print this line:
Mathf.Abs(Mathf.Round(346.8f * 1000) / 1000)) / (4 * 28.9f)
it returns 3 (as it should). So my question is what's the diffrence here? i'm not changing any values or anything.
↧