Math functions
Pls check how to use functions in the docs
This function calculates it and return is Function Structure $name[num;num2]

It is even possible to add more than 2 numbers by adding another number with a separator

example: $sum[1;2;3] //Output:6

You can have nested Calculation too

example: $sum[$sum[2;1];2] //Output:7

$math[expression]

calculates inside it
1
$math[2+2] //4
2
$math[(2+2)*4] //16
3
/*
4
+ = Addition
5
- = Subtraction
6
/ = Division
7
* = Multi
8
() = Parathenses for equations inside
9
*/
Copied!

$sum[num;num2]

this function calculates the sum
1
Sum: $sum[2000;21]
Copied!
Output: Sum: 2021

$sub[num;num2]

this function calculates the difference like 10-4=6
1
Sub: $sub[10;4]
Copied!
Output: Sub: 6

$multi[num;num2]

this function multiplies the value
1
Multiply: $multi[10;4]
Copied!
Output: Multiply: 40

$divide[num;num2]

this function divides the value
1
Divide: $divide[10;4]
Copied!
Output: Divide: 2.5

$modulo[num;num2]

this function calc. with % 10%4 =2
1
Modulo: $modulo[10;4]
Copied!
Output: Modulo: 2

Rounding Numbers

this function allows you to round Number

$round[num]

this function rounds the number with Math.round()
1
Round: $round[3.1415926535]
Copied!
Output: Round: 3

$roundTenth[num;to (optional)]

this function rounds the number with .toFixed
1
Round: $round[3.1415926535;5]
Copied!
Output: Round: 3.1416

$truncate[number]

this function remove the decimal
1
Truncate: $truncate[6382638.7897908908]
Copied!
Output: Truncate: 6382638

$abbreviate[number]

this function abbreviates large numbers
Abbreviation to: k - thousands m - millions b - billions t - trillions
1
abbreviate: $abbreviate[6000]
Copied!
Output: abbreviate: 6k

$ordinal[number]

adds the correct suffix after the number st,nd,rd,th
Like 2nd or 3rd ..
1
ordinal: $ordinal[2]
Copied!
Output: abbreviate: 2nd
Last modified 6mo ago