We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08657c0 commit 1bb4294Copy full SHA for 1bb4294
1 file changed
RVLTS/egg/math/quat.ts
@@ -10,7 +10,16 @@ export class Quatf {
10
z: number;
11
w: number;
12
13
- constructor(_w: number, vec: Vector3f) {
+ 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
+ }
23
this.x = vec.x;
24
this.y = vec.y;
25
this.z = vec.z;
0 commit comments