jumpstorm/client/lib/utils/dotProduct.ts

5 lines
170 B
TypeScript
Raw Normal View History

2023-07-19 23:38:24 -04:00
import type { Coord2D } from "../interfaces";
export const dotProduct = (vector1: Coord2D, vector2: Coord2D): number =>
vector1.x * vector2.x + vector1.y * vector2.y;