benilla-re systems structs docs

Vector3LengthSquared

function · spline · primitive

Address
0x4549f0 · 31 bytes, up to 0x454a0e
Signature
float __thiscall (float *this)
Meaning
Returns x*x + y*y + z*z of a 3D vector
Confidence
verified, proof one
Finding
spline#vector-leaves
Test
animation::m2_animate_difftest, gx::lightning_segment_subdivide_difftest, gx::lightningrender_strip_difftest, models::billboard_tangent_frame_difftest, models::bspdispatch_normalize_difftest, models::burst_velocity_difftest, models::camera_facing_basis_difftest, models::emit_shape_plane_difftest, models::emit_shape_spline_difftest, models::prologue_length_difftest, models::render_normalize_difftest, models::ribbon_frame_build_difftest, models::seg_normalize_difftest, models::shadow_normalize_axes_difftest, spline::vec3_len2_diff

Finding: Vector leaves in spline

0x4549a0(x, y, z) stores three floats at ecx and is the constructor of the file's vector type, with 401 call sites. 0x454980 leaves x² + y² of a vector in st0, and 0x4549f0 leaves (x² + y²) + z², both at 53 bits. 0x4549c0(s) divides a vector in place: it computes 1/s at 53 bits once and stores each component times it as a float.

The derivation is in the doc.

Callers 32

Callees 0

None by a direct call or jump.

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