()
| 54 | len(): number { return Math.sqrt(this.lenSq()); } |
| 55 | dist(a: Vec3): number { return Math.sqrt(this.distSq(a)); } |
| 56 | normalize(): Vec3 { return this.mul(1.0 / Math.sqrt(this.lenSq())); } |
| 57 | mid(a: Vec3): Vec3 { return new Vec3((this.x + a.x) * 0.5, (this.y + a.y) * 0.5, (this.z + a.z) * 0.5); } |
| 58 | abs() { return new Vec3(Math.abs(this.x), Math.abs(this.y), Math.abs(this.z)); } |
| 59 | clone(): Vec3 { return new Vec3(this.x, this.y, this.z); } |