added Constructor to Vec

This commit is contained in:
Djeeberjr 2023-03-28 00:55:37 +02:00
parent 7480afc5a1
commit da78641aec

View File

@ -3,10 +3,21 @@ package lib;
@:structInit class Vec2<T> {
public var x:T;
public var y:T;
public function new(x:T, y:T) {
this.x = x;
this.y = y;
}
}
@:structInit class Vec3<T> {
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;
}
}