Browse Source

Remove Number.EPSILON from calculation for area of Triangle (#9844)

- Thanks @Mugen87!
Joshua Koo 8 years ago
parent
commit
7e0ea0bcdf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extras/ShapeUtils.js

+ 1 - 1
src/extras/ShapeUtils.js

@@ -54,7 +54,7 @@ ShapeUtils = {
 			cx = contour[ verts[ w ] ].x;
 			cy = contour[ verts[ w ] ].y;
 
-			if ( Number.EPSILON > ( ( ( bx - ax ) * ( cy - ay ) ) - ( ( by - ay ) * ( cx - ax ) ) ) ) return false;
+			if ( ( bx - ax ) * ( cy - ay ) - ( by - ay ) * ( cx - ax ) <= 0 ) return false;
 
 			var aX, aY, bX, bY, cX, cY;
 			var apx, apy, bpx, bpy, cpx, cpy;