mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Change vperpXZ to vperpXY
This commit is contained in:
parent
8709a256d9
commit
edd1c62352
@ -368,7 +368,7 @@ void dtRandomPointInConvexPoly(const float* pts, const int npts, float* areas,
|
||||
out[2] = a*pa[2] + b*pb[2] + c*pc[2];
|
||||
}
|
||||
|
||||
inline float vperpXZ(const float* a, const float* b) { return a[0]*b[2] - a[2]*b[0]; }
|
||||
inline float vperpXY(const float* a, const float* b) { return a[0]*b[1] - a[1]*b[0]; }
|
||||
|
||||
bool dtIntersectSegSeg2D(const float* ap, const float* aq,
|
||||
const float* bp, const float* bq,
|
||||
@ -378,10 +378,10 @@ bool dtIntersectSegSeg2D(const float* ap, const float* aq,
|
||||
dtVsub(u,aq,ap);
|
||||
dtVsub(v,bq,bp);
|
||||
dtVsub(w,ap,bp);
|
||||
float d = vperpXZ(u,v);
|
||||
float d = vperpXY(u,v);
|
||||
if (fabsf(d) < 1e-6f) return false;
|
||||
s = vperpXZ(v,w) / d;
|
||||
t = vperpXZ(u,w) / d;
|
||||
s = vperpXY(v,w) / d;
|
||||
t = vperpXY(u,w) / d;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user