feat: fromXYZ
This commit is contained in:
@@ -5,6 +5,10 @@ export class Vec3 {
|
||||
public z: number,
|
||||
) { }
|
||||
|
||||
public static fromXYZ({ x, y, z }: { x: number; y: number; z: number }) {
|
||||
return new Vec3(x, y, z);
|
||||
}
|
||||
|
||||
public dot(b: Vec3): number {
|
||||
return this.x * b.x + this.y * b.y + this.z * b.z;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user