From c6e9baa0009f7cce0f6ff156a3957ef04a8cb684 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 12 Aug 2023 13:49:16 -0600 Subject: the great engine refactor --- engine/utils/normalizeVector.ts | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 engine/utils/normalizeVector.ts (limited to 'engine/utils/normalizeVector.ts') diff --git a/engine/utils/normalizeVector.ts b/engine/utils/normalizeVector.ts deleted file mode 100644 index e6dfd7f..0000000 --- a/engine/utils/normalizeVector.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Coord2D } from "../interfaces"; - -export const normalizeVector = (vector: Coord2D): Coord2D => { - const { x, y } = vector; - const length = Math.sqrt(x * x + y * y); - - return { x: x / length, y: y / length }; -}; -- cgit v1.3