(dx, dy)
| 140144 | exports.default = Delaunator; |
| 140145 | // monotonically increases with real angle, but doesn't need expensive trigonometry |
| 140146 | function pseudoAngle(dx, dy) { |
| 140147 | const p = dx / (Math.abs(dx) + Math.abs(dy)); |
| 140148 | return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] |
| 140149 | } |
| 140150 | function dist(ax, ay, bx, by) { |
| 140151 | const dx = ax - bx; |
| 140152 | const dy = ay - by; |