Double Extensions

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

Double extensions

Properties:

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

Methods:

Name Return Description
randomBetween(min: Double, max: Double) Double Random double between two double values.

Operators:

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