mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 20:55:41 +02:00
fase 5
This commit is contained in:
+8
@@ -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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user