123456789101112131415161718192021222324252627282930313233343536373839 |
- module.exports = class Vector3 {
-
- constructor(x, y, z) {
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- add(operand) {
- this.x += operand.x;
- this.y += operand.y;
- this.z += operand.z;
- }
-
- negate() {
- return new Vector3(
- -this.x,
- -this.y,
- -this.z,
- );
- }
- };
|