Float Extensions

Omar Albeik edited this page Dec 9, 2016 · 4 revisions

Float extensions

Properties:

Name Description
abs Absolute of float value.
asLocaleCurrency String with number and current locale currency.
ceil Ceil of float value.
degreesToRadians Radian value of degree input.
floor Floor of float value.
radiansToDegrees Degree value of radian input.

Methods:

Name Return Description
randomBetween(min: Float, max: Float) Float Random float between two float values.

Operators:

Name Return Description
** Float Value of exponentiation (example: 4.4 ** 0.5 = 2.0976176963).
Float Square root of float.
± (infix) (Float, Float) Tuple of plus-minus operation (example: 2.5 ± 1.5 -> (4, 1)).
± (prefix) (Float, Float) Tuple of plus-minus operation (example: ± 2.5 -> (2.5, -2.5)).