MCPcopy Create free account
hub / github.com/plotly/plotly.js / makeRegularPolygon

Function makeRegularPolygon

src/plots/polar/helpers.js:110–120  ·  view source on GitHub ↗
(r, vangles)

Source from the content-addressed store, hash-verified

108}
109
110function makeRegularPolygon(r, vangles) {
111 var len = vangles.length;
112 var vertices = new Array(len + 1);
113 var i;
114 for(i = 0; i < len; i++) {
115 var va = vangles[i];
116 vertices[i] = [r * Math.cos(va), r * Math.sin(va)];
117 }
118 vertices[i] = vertices[0].slice();
119 return vertices;
120}
121
122function makeClippedPolygon(r, a0, a1, vangles) {
123 var len = vangles.length;

Callers 1

makePolygonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…