throttled stats

This commit is contained in:
Ryan Di 2023-04-10 18:10:46 +08:00
parent dbc48cfee2
commit 80b9fd18b9
5 changed files with 201 additions and 96 deletions

View file

@ -472,3 +472,11 @@ export const isRightAngle = (angle: number) => {
// angle, which we can check with modulo after rounding.
return Math.round((angle / Math.PI) * 10000) % 5000 === 0;
};
export const radianToDegree = (r: number) => {
return (r * 180) / Math.PI;
};
export const degreeToRadian = (d: number) => {
return (d / 180) * Math.PI;
};