benilla-re systems structs docs

SplitFloorFloat

function · cmath · unreached

Address
0x4564c0 · 78 bytes, up to 0x45650d
Signature
void __fastcall (float *fraction, float *whole, float x)
Meaning
Stores the fraction of a float and its whole part, one lower for negatives, as a float
Confidence
verified, proof two
Finding
cmath/scalars#splitting-a-float

Finding: Splitting a float in cmath: scalars

Four routines split x into ⌊x⌋ and a fraction. 0x4563e0 (a double on the stack) and 0x456420 (a float) truncate with __ftol and subtract 1 when x is negative: edx holds the address of the integer and ecx the address of the fraction x − i. 0x456470 and 0x4564c0 keep the whole part as a double or a float. A negative whole number gives a part one too low and a fraction of 1.0.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

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