Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_math
percent/2
Description
percent/2 is an Erlang function exported by "age_math" module.
Returns percentage of a number value.
This function is useful to calculate the percentage of a smaller part (Fraction) from a larger part (Total).
References
•fraction/2
Parameters
Name
Type
Fraction
number()
Fraction number
Total
Total number
Result
Value or Type
Returns percentage of total
Code Sample
> age_math:percent(25.1, 200). 12.55