Manipulate
How to manipulate numbro numbers (not used often, but still useful).
Operations
numbro provides a set of basic operations to apply to numbers.
Before | Function | After |
---|---|---|
1000 | .add(100) | 1100 |
1100 | .subtract(100) | 1000 |
1000 | .multiply(100) | 100000 |
100000 | .divide(100) | 1000 |
Value
The value of a numbro is always available via the value
function.
Set
Set the value of a numbro.
Difference
Find the difference between your numbro object and a numeric value.
Clone
Clone any numbro as easy as using clone
.