dylanebert's picture
dylanebert HF Staff
checkpoint
cc654e9
raw
history blame
524 Bytes
class Quaternion {
x: number;
y: number;
z: number;
w: number;
constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 1) {
this.x = x;
this.y = y;
this.z = z;
this.w = w;
}
set(x: number, y: number, z: number, w: number): Quaternion {
this.x = x;
this.y = y;
this.z = z;
this.w = w;
return this;
}
flat(): number[] {
return [this.x, this.y, this.z, this.w];
}
}
export { Quaternion };