victory-native
Version:
A charting library for React Native with a focus on performance and customization.
17 lines (14 loc) • 406 B
text/typescript
import type { SkPoint } from "@shopify/react-native-skia";
export function degreesToRadians(degrees: number): number {
return (degrees * Math.PI) / 180;
}
export function calculatePointOnCircumference(
center: SkPoint,
radius: number,
angleInRadians: number,
): SkPoint {
return {
x: center.x + radius * Math.cos(angleInRadians),
y: center.y + radius * Math.sin(angleInRadians),
};
}