Calculate percentage of given arguments

number:calc_percentage(FLOAT $number, FLOAT $total) : FLOAT

number:calc_percentage(10, 100) . '%'
#=> "10%"

number:calc_percentage(50, 120)
#=> 41.66666666666667

Copyright ©2013-2022 SunSed®. All rights reserved.