You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(area(a.prev,a,b.prev)||area(a,b.prev,b))||// does not create opposite-facing sectors
equals(a,b)&&area(a.prev,a,a.next)>0&&area(b.prev,b,b.next)>0);// special zero-length case
}
As I understand the code now, it checks that at least one of the triangles a.prev, a, b.prev and a, b.prev, b has non zero area. I do not understand the intent well enough, the comment says "does not create opposite-facing sectors".
If the code is correct, perhaps an explicit comparion using !== 0 would make the intent clearer?
Is handling the number result of the
area
call as a boolean value intended in the snippet below?earcut/src/earcut.js
Lines 476 to 481 in 36742a5
As I understand the code now, it checks that at least one of the triangles a.prev, a, b.prev and a, b.prev, b has non zero area. I do not understand the intent well enough, the comment says "does not create opposite-facing sectors".
If the code is correct, perhaps an explicit comparion using !== 0 would make the intent clearer?
(Originally reported as mrdoob/three.js#20200)
The text was updated successfully, but these errors were encountered: