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

Function yForAngle

test/specs/scale.radialLinear.tests.js:635–642  ·  view source on GitHub ↗
(y, h, angle)

Source from the content-addressed store, hash-verified

633 const outerDistance = chart.scales.r.getDistanceFromCenterForValue(opts.ticks.reverse ? chart.scales.r.min : chart.scales.r.max);
634 const tickBackdropHeight = 0;
635 const yForAngle = function(y, h, angle) {
636 if (angle === 90 || angle === 270) {
637 y -= (h / 2);
638 } else if (angle > 270 || angle < 90) {
639 y -= h;
640 }
641 return y;
642 };
643 const toDegrees = function(radians) {
644 return radians * (180 / PI);
645 };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected