From 8f522639a647dc83426f563d0455b0a904b2fc9a Mon Sep 17 00:00:00 2001 From: Tinko Bartels Date: Wed, 24 May 2023 21:33:50 +0200 Subject: [PATCH] Remove redundant test in orient2d for better branch predictability. --- src/orient2d.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/orient2d.js b/src/orient2d.js index 312017a..dc0816b 100644 --- a/src/orient2d.js +++ b/src/orient2d.js @@ -57,8 +57,6 @@ export function orient2d(ax, ay, bx, by, cx, cy) { const detright = (ax - cx) * (by - cy); const det = detleft - detright; - if (detleft === 0 || detright === 0 || (detleft > 0) !== (detright > 0)) return det; - const detsum = Math.abs(detleft + detright); if (Math.abs(det) >= ccwerrboundA * detsum) return det;