Answer the question
In order to leave comments, you need to log in
How to get the remainder of a division if the left number is less than the right?
Greetings, there was a need to determine in Unity the slope of an object with a rotation step of 45 degrees, i.e. 0, 45, 90, etc.
How to determine that the angle is 45, 135, 225...?
The first thing that came to mind was to use the remainder of the division, but if you use 45, then it will always be 0, and 90 does not work in the case of 45% 90, because will be 45, instead of 5, the question follows:
How to get the remainder of the division, if the left number is less than the right one?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question