Files
snk/packages/compute/point.ts
2020-07-30 16:27:04 +02:00

11 lines
229 B
TypeScript

export type Point = { x: number; y: number };
export const around4 = [
{ x: 1, y: 0 },
{ x: 0, y: -1 },
{ x: -1, y: 0 },
{ x: 0, y: 1 },
];
export const pointEquals = (a: Point, b: Point) => a.x === b.x && a.y === b.y;