s_quaternionEpsilon
global · cmath
- Address
0x81d9a0· 4 bytes, up to0x81d9a3- Type
const float- Meaning
- Holds 2^-21, the sine bound under which the quaternion functions copy
- Confidence
- verified, proof two
- Finding
- cmath/quaternions#exponential-and-logarithm
Finding: Exponential and logarithm in cmath: quaternions
0x7c0450(out) maps a rotation vector v = (x, y, z) (the first three floats of this) to the
quaternion (k·v, cos θ) with θ = |v| and k = sin θ/θ; when |sin θ| is below 2⁻²¹ (0x81d9a0)
it writes (v, cos θ) unchanged. 0x7c04f0(out) is the logarithm: for |w| strictly below 1 it
writes ((θ/sin θ)·v, 0) with θ = acos(w), and when |sin θ| is below 2⁻²¹, or |w| is 1 or more or NaN,
it writes (v, 0). The multiplication in the exponential uses k unrounded for the z component and
rounded for x and y.
The derivation is in the doc.