This repository was archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 126
VRageMath.MathHelper.MonotonicCosine
Malware edited this page May 4, 2019
·
15 revisions
← Index ← Namespace Index ← MathHelper
public static float MonotonicCosine(float radians)
Calculate the monotonic cosine of a value. Monotonic cosine is an alternative cosine encoding that is monotonic in the [-pi, pi] interval. We use this when some parameter of an onject in a planet is constrained by latitude. The 'monotonicity' is guaranteed by subtracting the cosine value from 2 if the angle is positive. So for instance MonotonicCos(pi/2) = 2. This only works in the above interval of course.
The cosine of the angle if it is > 0, 2 - that value otherwise.
- float radians
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!