MCPcopy Create free account
hub / github.com/microsoft/SandDance / constructor

Method constructor

docs/app/js/sanddance-app.js:69062–69073  ·  view source on GitHub ↗
(x = 0, y = 0)

Source from the content-addressed store, hash-verified

69060var _glMatrixExtras = require("../lib/gl-matrix-extras");
69061class Vector2 extends (0, _vectorDefault.default) {
69062 constructor(x = 0, y = 0){
69063 super(2);
69064 if ((0, _common.isArray)(x) && arguments.length === 1) this.copy(x);
69065 else {
69066 if ((0, _common.config).debug) {
69067 (0, _validators.checkNumber)(x);
69068 (0, _validators.checkNumber)(y);
69069 }
69070 this[0] = x;
69071 this[1] = y;
69072 }
69073 }
69074 set(x, y) {
69075 this[0] = x;
69076 this[1] = y;

Callers

nothing calls this directly

Calls 1

copyMethod · 0.95

Tested by

no test coverage detected