fix: Various fixes

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2026-04-10 18:29:29 +00:00
parent 56b2b3a41e
commit 25ec8d0869
8 changed files with 161 additions and 152 deletions
-11
View File
@@ -158,14 +158,3 @@ 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]);
/**
* Scalar projection of vector v onto normal.
*
* @param v
* @param normal
* @returns
*/
export const vectorReflect = (v: Vector, normal: Vector): Vector => {
return vectorSubtract(v, vectorScale(normal, 2 * vectorDot(v, normal)));
};