Method Math2.PercentToValue(+ 1 overload)
Overload
Returns percent % of whole: (long)whole * percent / 100
.
public static int PercentToValue(int whole, int percent, bool canRoundUp = false)
Parameters
whole (int) |
percent (int) |
canRoundUp (bool)
Use Math2.MulDiv, which can round down or up. If |
Returns
Exceptions
Overload(top)
Returns percent % of whole: whole * percent / 100
.
public static double PercentToValue(double whole, double percent)