MCPcopy Create free account
hub / github.com/processing/p5.js / cross

Function cross

test/types/webgl-pixels.ts:319–321  ·  view source on GitHub ↗
(a: p5.Vector, b: p5.Vector, o: p5.Vector)

Source from the content-addressed store, hash-verified

317}
318
319const cross = (a: p5.Vector, b: p5.Vector, o: p5.Vector) => {
320 return (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x)
321}
322
323function convexHull(points: p5.Vector[]) {
324 points.sort(comparison)

Callers 1

convexHullFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected