Calculates the percentages for each part from total. When total is omitted, it is assumed that the total is the sum of the parts.
array of floating point percentages, e.g. [0.1, 0.02, 0.587] is equivalent to 10%, 2%, 58.7%
array of integer values
optional param to allow sum(parts) to be smaller than the total
Generated using TypeDoc
Calculates the percentages for each part from total. When total is omitted, it is assumed that the total is the sum of the parts.
Returns
array of floating point percentages, e.g. [0.1, 0.02, 0.587] is equivalent to 10%, 2%, 58.7%