From 72c6c7de12e9833f52bf2d0718d70f044f8ab57e Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Thu, 20 Jul 2023 20:47:32 -0700 Subject: a bit of refactoring; importing engine into bun for server --- client/lib/utils/normalizeVector.ts | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 client/lib/utils/normalizeVector.ts (limited to 'client/lib/utils/normalizeVector.ts') diff --git a/client/lib/utils/normalizeVector.ts b/client/lib/utils/normalizeVector.ts deleted file mode 100644 index e6dfd7f..0000000 --- a/client/lib/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