This commit is contained in:
2025-07-23 16:57:31 +03:30
parent 96b0d450b6
commit ffe1d06893
4701 changed files with 449700 additions and 367 deletions
+8
View File
@@ -0,0 +1,8 @@
export function getRoundingMethod(method) {
return (number) => {
const round = method ? Math[method] : Math.trunc;
const result = round(number);
// Prevent negative zero
return result === 0 ? 0 : result;
};
}