summaryrefslogtreecommitdiff
path: root/src/engine/vector2.js
diff options
context:
space:
mode:
authorniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2024-12-15 14:30:06 +0100
committerniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2024-12-15 14:30:06 +0100
commitef94d922448ff5f0cac8d6bd1e60e546e4bee6ed (patch)
tree9bb7d229d1cce8cefe8df52c30f07e9d4a7ed6e4 /src/engine/vector2.js
parentadd682d6aaa50b2c1561731cdb1696bf7665cba3 (diff)
allow placing when attacking
Diffstat (limited to 'src/engine/vector2.js')
-rw-r--r--src/engine/vector2.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/vector2.js b/src/engine/vector2.js
index 8b10e28..0cf2217 100644
--- a/src/engine/vector2.js
+++ b/src/engine/vector2.js
@@ -4,17 +4,17 @@ export class Vector2 {
this.y = y
}
- static sum(a, b) {
+ static sum(vector_a, vector_b) {
return new Vector2(
- a.x + b.x,
- a.y + b.y,
+ vector_a.x + vector_b.x,
+ vector_a.y + vector_b.y,
)
}
- static equals(a, b) {
+ static equals(vector_a, vector_b) {
if (
- a.x == b.x &&
- a.y == b.y
+ vector_a.x == vector_b.x &&
+ vector_a.y == vector_b.y
) {
return true
}