ignore eps in coplanar tests
This commit is contained in:
parent
b556b60107
commit
c1e6633cd4
5
stl_3d.c
5
stl_3d.c
@ -111,7 +111,7 @@ stl_angle(
|
|||||||
v3_t cross = v3_cross(dx21, dx43);
|
v3_t cross = v3_cross(dx21, dx43);
|
||||||
float dot = v3_dot(dx31, cross);
|
float dot = v3_dot(dx31, cross);
|
||||||
|
|
||||||
if (debug)
|
//if (debug)
|
||||||
fprintf(stderr, "dot %f:\n %f,%f,%f\n %f,%f,%f\n %f,%f,%f\n %f,%f,%f\n",
|
fprintf(stderr, "dot %f:\n %f,%f,%f\n %f,%f,%f\n %f,%f,%f\n %f,%f,%f\n",
|
||||||
dot,
|
dot,
|
||||||
x1.p[0], x1.p[1], x1.p[2],
|
x1.p[0], x1.p[1], x1.p[2],
|
||||||
@ -120,7 +120,8 @@ stl_angle(
|
|||||||
x4.p[0], x4.p[1], x4.p[2]
|
x4.p[0], x4.p[1], x4.p[2]
|
||||||
);
|
);
|
||||||
|
|
||||||
int check = -EPS < dot && dot < +EPS;
|
//int check = -EPS < dot && dot < +EPS;
|
||||||
|
int check = -1 < dot && dot < +1;
|
||||||
|
|
||||||
// if the dot product is not close enough to zero, they
|
// if the dot product is not close enough to zero, they
|
||||||
// are not coplanar.
|
// are not coplanar.
|
||||||
|
Loading…
Reference in New Issue
Block a user