mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
floor/ceil
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
5a4e50b19d
commit
c0f3ac11f0
1 changed files with 8 additions and 0 deletions
|
@ -421,6 +421,14 @@ const baseValues = {
|
|||
if (isNaN(arg)) return 0;
|
||||
return decimals === 0 ? Math.round(arg) : arg.toFixed(decimals);
|
||||
},
|
||||
floor(arg) {
|
||||
if (isNaN(arg)) return 0;
|
||||
return Math.floor(parseFloat(arg));
|
||||
},
|
||||
ceil(arg) {
|
||||
if (isNaN(arg)) return 0;
|
||||
return Math.ceil(parseFloat(arg));
|
||||
},
|
||||
add(...args) {
|
||||
return args.reduce((result, arg) => {
|
||||
if (isNaN(arg)) return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue