Reputation: 309
Using Fmod
, I am able to restrict the calculated angle between [0, maxLimit].
But how do we limit the same angle between [minLimit, maxLimit] ?
Upvotes: 0
Views: 150
Reputation: 309
Found the solution,
[0, abs(maxLimit - minLimit)] and add the minLimit.
Upvotes: 0
Reputation: 11
Normalize to [0, abs(maxLimit - minLimit)] and then subtract minLimit.
Upvotes: 1