The percentage
function takes one number as parameter between 0 and 1 and convert it to percentage
Syntax
percentage(0.12)
Parameters
- number: Number to be transform to percentage
- decimal: Optional number parameter to add decimal to percentage
Examples
percentage(0.12) => 12%
percentage(0.123, decimal=1) => 12.3%
percentage(0.1234, decimal=2) => 12.34%