123456789101112131415161718192021222324252627282930313233343536373839404142 |
- const Vector3 = require("./Vector3");
- module.exports = class Moon {
-
- constructor(position) {
-
- this.position = position;
-
- this._initialPosition = position.negate().negate();
-
- this.velocity = new Vector3(0, 0, 0);
- }
-
- hasReachedInitialState() {
- return (
- this._initialPosition.x == this.position.x
- && this._initialPosition.y == this.position.y
- && this._initialPosition.z == this.position.z
- ) && (
- this.velocity.x == 0
- && this.velocity.y == 0
- && this.velocity.z == 0
- );
- }
- };
|