Skip to content

Commit 1bb4294

Browse files
authored
blank constructor for egg/math/quat.Quatf
1 parent 08657c0 commit 1bb4294

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

RVLTS/egg/math/quat.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ export class Quatf {
1010
z: number;
1111
w: number;
1212

13-
constructor(_w: number, vec: Vector3f) {
13+
constructor()
14+
constructor(_w: number, vec: Vector3f)
15+
constructor(_w?: number, vec?: Vector3f) {
16+
if (_w == undefined && vec == undefined) {
17+
this.x = 0;
18+
this.y = 0;
19+
this.z = 0;
20+
this.w = 0;
21+
return;
22+
}
1423
this.x = vec.x;
1524
this.y = vec.y;
1625
this.z = vec.z;

0 commit comments

Comments
 (0)