s_circleBoxModeCases
global · cmath
- Address
0x7c229c· 16 bytes, up to0x7c22ab- Type
void *[4]- Meaning
- Holds the four mode case addresses of the circle against a box test 0x7c2040
- Confidence
- verified, proof two
- Finding
- cmath/geometry#circle-and-point-against-a-box
Finding: Circle and point against a box in cmath: intersections
0x7c2040(mode) tests the circle or sphere in edx (centre x and y at +0 and +4, radius at +0xc) against the box in ecx on the
first two axes and returns a byte, with r² the rounded squared radius. Per axis dmin and dmax are the squared distances to the two faces;
near sums dmin for a centre below the minimum and dmax above the maximum, and far sums the larger of the two. Mode 3 is true when
near≤r², and mode 2 when also r²≤far. Mode 1 needs near≤r² and a hit flag, mode 0 the flag, near≤r² and r²≤far. A mode above 3 returns 0.
The derivation is in the doc.