s_cameraInvTwoPi
global · camera
- Address
0xcf5730· 4 bytes, up to0xcf5733- Type
float- Meaning
- Holds 1/2π (0x3e22f983), set at startup, read by 0x7abbe0
- Confidence
- verified, proof two
- Finding
- camera#angle-properties
Finding: Angle properties in camera
Setting an angle stores it reduced by 0x7abbe0, then recomputes its cosine at +0x20 and its
sine at +0x24 of the property, every time. 0x7abbe0 returns x − 2π·trunc(x/2π) for
x ≥ 0 and x − 2π·(trunc(x/2π) − 1) for x < 0, computed at the client's 53-bit precision.
For |x| below 81.68141 the result lies in [0, 2π]: 2π maps to 2π, −2π to 0, and −0.0 stays
−0.0. The stored angle changes, and the property is marked changed, only when it differs from the
old value or is NaN.
The derivation is in the doc.