react-circle-slider
Version:
Circle Slider UI component for React
21 lines (20 loc) • 459 B
text/typescript
export const pathGenerator = (
center: number,
radius: number,
direction: number,
x: number,
y: number,
): string => {
const points = [];
points.push("M" + center);
points.push(center + radius);
points.push("A");
points.push(radius);
points.push(radius);
points.push(0);
points.push(direction);
points.push(1);
points.push(x);
points.push(y);
return points.join(" ");
};