신한슬
신한슬

Reputation: 309

How to normalize an angle between two limits?

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

Answers (2)

신한슬
신한슬

Reputation: 309

Found the solution,

[0, abs(maxLimit - minLimit)] and add the minLimit.

Upvotes: 0

Najib Ishaq
Najib Ishaq

Reputation: 11

Normalize to [0, abs(maxLimit - minLimit)] and then subtract minLimit.

Upvotes: 1

Related Questions