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

Method length

code/draw_layout.js:16–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 return new Vec(this.x * factor, this.y * factor);
15 }
16 get length() {
17 return Math.sqrt(this.x * this.x + this.y * this.y);
18 }
19}
20
21// Since we will want to inspect the layouts our code produces, let's

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected