Updates
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user