This commit is contained in:
James E McClure 2018-09-14 22:00:32 -04:00
parent a2b2108d95
commit 8dfe9478bb

View File

@ -385,7 +385,10 @@ double DECL::EdgeAngle(int edge)
V.x = nx/len; V.y = ny/len; V.z = nz/len;
dotprod = U.x*V.x + U.y*V.y + U.z*V.z;
if (dotprod > 1.f) dotprod=1.f;
if (dotprod < 0.f) dotprod=-dotprod;
if (dotprod < 0.f){
dotprod=-dotprod;
V.x = -V.x; V.y = -V.y; V.z = -V.z;
}
angle = acos(dotprod);
/* project onto plane of cube face also works
W = U - dotprod*V;