38 const float minx =
dtMax(amin[0]+px,bmin[0]+px);
39 const float maxx =
dtMin(amax[0]-px,bmax[0]-px);
44 const float ad = (amax[1]-amin[1]) / (amax[0]-amin[0]);
45 const float ak = amin[1] - ad*amin[0];
46 const float bd = (bmax[1]-bmin[1]) / (bmax[0]-bmin[0]);
47 const float bk = bmin[1] - bd*bmin[0];
48 const float aminy = ad*minx + ak;
49 const float amaxy = ad*maxx + ak;
50 const float bminy = bd*minx + bk;
51 const float bmaxy = bd*maxx + bk;
52 const float dmin = bminy - aminy;
53 const float dmax = bmaxy - amaxy;
60 const float thr =
dtSqr(py*2);
61 if (dmin*dmin <= thr || dmax*dmax <= thr)
T dtMax(T a, T b)
Definition: DetourCommon.h:57
T dtMin(T a, T b)
Definition: DetourCommon.h:51
T dtSqr(T a)
Definition: DetourCommon.h:67