diff --git a/src/util/Pos.hx b/src/util/Pos.hx index e59a95f..99645b7 100644 --- a/src/util/Pos.hx +++ b/src/util/Pos.hx @@ -27,4 +27,20 @@ abstract Pos(Vec2) from Vec2 to Vec2{ x: this.x - rhs.x, }); } + + @:op(A * B) + public function multiply(rhs: Vec2): Pos { + return new Pos({ + y: this.y * rhs.y, + x: this.x * rhs.x, + }); + } + + @:op(-A) + public function negate(): Pos { + return new Pos({ + y: -this.y, + x: -this.x, + }); + } }