diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-25 16:48:17 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-25 16:48:17 -0600 |
commit | 773ce84f4bf559337e132edd7fcce02a0a2598fd (patch) | |
tree | 5fd0b452b459cc5a5b6a1ed98f2d7b9af950864d /engine/utils | |
parent | dec7b614d895a1b507137e4a96a8999ff63aa179 (diff) | |
download | jumpstorm-773ce84f4bf559337e132edd7fcce02a0a2598fd.tar.gz jumpstorm-773ce84f4bf559337e132edd7fcce02a0a2598fd.zip |
prettier formatting
Diffstat (limited to 'engine/utils')
-rw-r--r-- | engine/utils/coding.ts | 8 | ||||
-rw-r--r-- | engine/utils/dotProduct.ts | 2 | ||||
-rw-r--r-- | engine/utils/index.ts | 8 | ||||
-rw-r--r-- | engine/utils/rotateVector.ts | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/engine/utils/coding.ts b/engine/utils/coding.ts index 4c1b17f..3f78889 100644 --- a/engine/utils/coding.ts +++ b/engine/utils/coding.ts @@ -1,8 +1,8 @@ const replacer = (_key: any, value: any) => { if (value instanceof Map) { return { - dataType: "Map", - value: Array.from(value.entries()), + dataType: 'Map', + value: Array.from(value.entries()) }; } else { return value; @@ -10,8 +10,8 @@ const replacer = (_key: any, value: any) => { }; const reviver = (_key: any, value: any) => { - if (typeof value === "object" && value !== null) { - if (value.dataType === "Map") { + if (typeof value === 'object' && value !== null) { + if (value.dataType === 'Map') { return new Map(value.value); } } diff --git a/engine/utils/dotProduct.ts b/engine/utils/dotProduct.ts index 59f8857..82bcdea 100644 --- a/engine/utils/dotProduct.ts +++ b/engine/utils/dotProduct.ts @@ -1,4 +1,4 @@ -import type { Coord2D } from "../interfaces"; +import type { Coord2D } from '../interfaces'; export const dotProduct = (vector1: Coord2D, vector2: Coord2D): number => vector1.x * vector2.x + vector1.y * vector2.y; diff --git a/engine/utils/index.ts b/engine/utils/index.ts index b70734f..65446d1 100644 --- a/engine/utils/index.ts +++ b/engine/utils/index.ts @@ -1,4 +1,4 @@ -export * from "./rotateVector"; -export * from "./dotProduct"; -export * from "./clamp"; -export * from "./coding"; +export * from './rotateVector'; +export * from './dotProduct'; +export * from './clamp'; +export * from './coding'; diff --git a/engine/utils/rotateVector.ts b/engine/utils/rotateVector.ts index 82bb54d..221ffb2 100644 --- a/engine/utils/rotateVector.ts +++ b/engine/utils/rotateVector.ts @@ -1,4 +1,4 @@ -import type { Coord2D } from "../interfaces"; +import type { Coord2D } from '../interfaces'; /** * ([[cos(θ), -sin(θ),]) ([x,) @@ -10,6 +10,6 @@ export const rotateVector = (vector: Coord2D, theta: number): Coord2D => { return { x: vector.x * cos - vector.y * sin, - y: vector.x * sin + vector.y * cos, + y: vector.x * sin + vector.y * cos }; }; |