IntersectSegments2D
function · unassigned · unreached
- Address
0x6dc2c0· 259 bytes, up to0x6dc3c2- Signature
uint32_t __fastcall (const NTempest::C2Vector *a, const NTempest::C2Vector *b, const NTempest::C2Vector *c, const NTempest::C2Vector *d, NTempest::C2Vector *out)- Meaning
- Returns 1 when two 2D segments cross, else writes where their lines meet
- Confidence
- verified, proof two
- Finding
- cmath/solids#segments-in-the-plane
Finding: Segments in the plane in cmath: boxes, cones and triangles
0x6dc2c0(c, d, out) takes the segment from ecx to edx and the segment from c to d (each point two floats). It
forms the determinant of the two directions and returns 0, writing nothing, when it is 0. Otherwise it computes the
parameters s along the first segment and t along the second, each rounded to a float, and returns 1 when both are in
[0, 1]. When not it writes a + s·(b − a), where the two lines meet, to out and returns 0. 0x7c3d20 is the same
with |det| < 0.001 (a float at 0x801360) as the miss test, and it writes the point before it tests the parameters.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.