MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / plus

Method plus

code/draw_layout.js:7–9  ·  view source on GitHub ↗
(other)

Source from the content-addressed store, hash-verified

5 this.x = x; this.y = y;
6 }
7 plus(other) {
8 return new Vec(this.x + other.x, this.y + other.y);
9 }
10 minus(other) {
11 return new Vec(this.x - other.x, this.y - other.y);
12 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected