MCPcopy
hub / github.com/slowlydev/f1-dash / describeArc

Function describeArc

dashboard/src/lib/circle.ts:9–16  ·  view source on GitHub ↗
(x: number, y: number, radius: number, startAngle: number, endAngle: number)

Source from the content-addressed store, hash-verified

7}
8
9export function describeArc(x: number, y: number, radius: number, startAngle: number, endAngle: number) {
10 const start = polarToCartesian(x, y, radius, endAngle);
11 const end = polarToCartesian(x, y, radius, startAngle);
12
13 const largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
14
15 return ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y].join(" ");
16}
17
18export function clamping(value: number, minOut: number, maxOut: number, maxIn: number): number {
19 const percTemp = value / maxIn;

Callers 2

GaugeFunction · 0.90
SpeedGaugeFunction · 0.90

Calls 1

polarToCartesianFunction · 0.85

Tested by

no test coverage detected