UNPKG

ts-scikit

Version:

A scientific toolkit written in Typescript

45 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Tuple4 = void 0; /** * A tuple with 4 components: x, y, z, and w. */ class Tuple4 { /** * Constructs a new tuple with 4 defined components. * @param x the x-component. * @param y the y-component. * @param z the z-component. * @param w the w-component. */ constructor(x, y, z, w) { this.x = x; this.y = y; this.z = z; this.w = w; } /** * Creates a new tuple from an existing one. * @param t the tuple. */ static FromExisting(t) { return t.clone(); } /** * Copies this tuple. * @returns a copy of this tuple. */ clone() { return new Tuple4(this.x, this.y, this.z, this.w); } /** * Determines if the components of this tuple equal those of another tuple. * @param o the tuple. * @returns true, if equals; false, otherwise. */ equals(o) { return (this.x === o.x && this.y === o.y && this.z === o.z && this.w === o.w); } } exports.Tuple4 = Tuple4; //# sourceMappingURL=tuple4.js.map