feat: fromXYZ
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "computercraft-mutil",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "",
|
||||
"license": "ISC",
|
||||
"author": "",
|
||||
|
||||
@@ -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