From cec1da14708e782801d0cc27fb13ff7586c0e96c Mon Sep 17 00:00:00 2001 From: nil Date: Fri, 13 Dec 2024 16:42:57 +0100 Subject: liberty check demo --- src/engine/vector2.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/engine/vector2.js (limited to 'src/engine/vector2.js') diff --git a/src/engine/vector2.js b/src/engine/vector2.js new file mode 100644 index 0000000..6c2a2a2 --- /dev/null +++ b/src/engine/vector2.js @@ -0,0 +1,13 @@ +export class Vector2 { + constructor(x, y) { + this.x = x + this.y = y + } + + static sum(a, b) { + return new Vector2( + a.x + b.x, + a.y + b.y, + ) + } +} -- cgit v1.2.3