MCPcopy
hub / github.com/chartjs/Chart.js / calcMax

Function calcMax

src/controllers/controller.doughnut.js:23–23  ·  view source on GitHub ↗
(angle, a, b)

Source from the content-addressed store, hash-verified

21 const endX = Math.cos(endAngle);
22 const endY = Math.sin(endAngle);
23 const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);
24 const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);
25 const maxX = calcMax(0, startX, endX);
26 const maxY = calcMax(HALF_PI, startY, endY);

Callers 1

getRatioAndOffsetFunction · 0.85

Calls 1

_angleBetweenFunction · 0.85

Tested by

no test coverage detected