-
Notifications
You must be signed in to change notification settings - Fork 0
utils.number.wren
clsource edited this page Nov 17, 2020
·
3 revisions
Simple number functions.
- Example:
import "domepunk/utils/number" for Number
- Since: 1.0.0
- Signature: Returns hex representation of the number
Fix decimals of a float number.
- Since: 1.0.0
- Signature: fixed(quantity:Num) -> Number
- Example:
var pi = Number.new(Num.pi).fixed(2).toNum // 3.14
// Also available as a static method
Number.fixed(Num.pi, 2) // 3.14
- Parameter quantity: Number of decimals to be fix
- Returns: A Number instance