UNPKG

astronomy-js

Version:

A lightweight javascript library for astronomical calculations.

16 lines (14 loc) 325 B
export class RectangularCoordinates { constructor(x, y, z) { this.x = x; this.y = y; this.z = z; } minus(rectangularCoordinates) { return new RectangularCoordinates( this.x - rectangularCoordinates.x, this.y - rectangularCoordinates.y, this.z - rectangularCoordinates.z, ); } }