benilla-re systems structs docs

__ftol

function · crt · boundary

Address
0x40a2b0 · 39 bytes, up to 0x40a2d6
Meaning
Converts st0 to a 64-bit integer by truncation and returns its low dword
Confidence
verified, proof one
Name from
the community database (idb)
Finding
camera#angle-properties
Test
glue::char_customize_color_difftest, glue::glue_init_viewport_difftest, sound::channel_volume_mix, sound::ramp_step, sound::volume_to_byte, spell::spellvisual_timeline_difftest

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.

Callers 677

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.