From da78641aec3242c2bf44bcc79c91f73c45bc2d9a Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 28 Mar 2023 00:55:37 +0200 Subject: [PATCH] added Constructor to Vec --- src/lib/Vec.hx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/Vec.hx b/src/lib/Vec.hx index 12472e8..2a60f13 100644 --- a/src/lib/Vec.hx +++ b/src/lib/Vec.hx @@ -3,10 +3,21 @@ package lib; @:structInit class Vec2 { public var x:T; public var y:T; + + public function new(x:T, y:T) { + this.x = x; + this.y = y; + } } @:structInit class Vec3 { public var x:T; public var y:T; public var z:T; + + public function new(x:T, y:T, z:T) { + this.x = x; + this.y = y; + this.z = z; + } }