feat: Basic outlining polygon

This commit is contained in:
Mark Tolmacs
2025-12-02 18:02:45 +00:00
parent d080833f4d
commit 6f4081e371
3 changed files with 103 additions and 6 deletions

View File

@@ -158,3 +158,8 @@ export const vectorNormalize = (v: Vector): Vector => {
* Calculate the right-hand normal of the vector.
*/
export const vectorNormal = (v: Vector): Vector => vector(v[1], -v[0]);
/**
* Calculate the left-hand normal of the vector.
*/
export const vectorAntiNormal = (v: Vector): Vector => vector(-v[1], v[0]);