This commit is contained in:
2026-10-01 08:02:47 +01:00
parent 6392457ffb
commit 3dc9f12ad4
104 changed files with 6536 additions and 1037 deletions
@@ -0,0 +1,5 @@
export default function TWUIRoundToNearestMagnitude(n: number) {
if (n === 0) return 0;
const magnitude = Math.pow(10, Math.floor(Math.log10(Math.abs(n))));
return Math.round(n / magnitude) * magnitude;
}