Number.toPercent
toPercent($numDecimals = 0) -> string
Description
Convert a float to formatted percentage.
$floatNum = 0.1234 $floatNum.toPercent() //= '12%' $floatNum.toPercent(1) //= '12.3%' $floatNum.toPercent(3) //= '12.340%'
Convert a float to formatted percentage.
$floatNum = 0.1234 $floatNum.toPercent() //= '12%' $floatNum.toPercent(1) //= '12.3%' $floatNum.toPercent(3) //= '12.340%'