added Constructor to Vec
This commit is contained in:
parent
7480afc5a1
commit
da78641aec
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user