summaryrefslogtreecommitdiff
path: root/engine/utils
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-25 16:48:17 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-25 16:48:17 -0600
commit773ce84f4bf559337e132edd7fcce02a0a2598fd (patch)
tree5fd0b452b459cc5a5b6a1ed98f2d7b9af950864d /engine/utils
parentdec7b614d895a1b507137e4a96a8999ff63aa179 (diff)
downloadjumpstorm-773ce84f4bf559337e132edd7fcce02a0a2598fd.tar.gz
jumpstorm-773ce84f4bf559337e132edd7fcce02a0a2598fd.zip
prettier formatting
Diffstat (limited to 'engine/utils')
-rw-r--r--engine/utils/coding.ts8
-rw-r--r--engine/utils/dotProduct.ts2
-rw-r--r--engine/utils/index.ts8
-rw-r--r--engine/utils/rotateVector.ts4
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
};
};