Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_math
round/2
Description
round/2 is an Erlang function exported by "age_math" module.
Returns an integer by rounding an input floating point value. Optionally you can set the rounding precision.
References
•trunc/2
Parameters
Name
Type
Number
number()
Input floating point value
Precision
integer()
Optional. Precision limit set as number of digits after the floating point.
Result
Value or Type
Returns an integer by rounding Number.
Code Sample
> age_math:round(123.456, 2). 123.46