1 | (function (factory) {
|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
3 | var v = factory(require, exports);
|
4 | if (v !== undefined) module.exports = v;
|
5 | }
|
6 | else if (typeof define === "function" && define.amd) {
|
7 | define(["require", "exports", "./Vector3d"], factory);
|
8 | }
|
9 | })(function (require, exports) {
|
10 | "use strict";
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | exports.Vector = void 0;
|
13 | const Vector3d_1 = require("./Vector3d");
|
14 | class Vector extends Vector3d_1.Vector3d {
|
15 | constructor(xOrCoords, y) {
|
16 | super(xOrCoords, y, 0);
|
17 | }
|
18 | static get origin() {
|
19 | return Vector.create(0, 0);
|
20 | }
|
21 | static clone(source) {
|
22 | return Vector.create(source.x, source.y);
|
23 | }
|
24 | static create(x, y) {
|
25 | return new Vector(x, y);
|
26 | }
|
27 | }
|
28 | exports.Vector = Vector;
|
29 | });
|