Files
2026-07-22 18:08:04 -05:00

17 lines
273 B
JavaScript

"use strict";
class Calc {
constructor(seed) {
this.v = seed;
}
add(n) {
this.v += n;
return this;
}
value() {
return this.v;
}
}
exports.Calc = Calc;
exports.magnitude = (v) => Math.sqrt(v.x * v.x + v.y * v.y);
exports.origin = { x: 0, y: 0 };