Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

VRageMath.MathHelper.MonotonicCosine

Malware edited this page May 4, 2019 · 15 revisions

IndexNamespace IndexMathHelper

Summary

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.

Returns

float

The cosine of the angle if it is > 0, 2 - that value otherwise.

Parameters

Clone this wiki locally