Function
inCircle
(ax, ay, bx, by, cx, cy, px, py)
Source from the content-addressed store, hash-verified
| 140164 | return sign < 0; |
| 140165 | } |
| 140166 | function inCircle(ax, ay, bx, by, cx, cy, px, py) { |
| 140167 | const dx = ax - px; |
| 140168 | const dy = ay - py; |
| 140169 | const ex = bx - px; |
| 140170 | const ey = by - py; |
| 140171 | const fx = cx - px; |
| 140172 | const fy = cy - py; |
| 140173 | const ap = dx * dx + dy * dy; |
| 140174 | const bp = ex * ex + ey * ey; |
| 140175 | const cp = fx * fx + fy * fy; |
| 140176 | return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0; |
| 140177 | } |
| 140178 | function circumradius(ax, ay, bx, by, cx, cy) { |
| 140179 | const dx = bx - ax; |
| 140180 | const dy = by - ay; |
Tested by
no test coverage detected