percent(a, b, base) → {number}
Work out what percentage value a
is of value b
using the given base.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
a | number | The value to work out the percentage for. | ||
b | number | The value you wish to get the percentage of. | ||
base | number | <optional> | 0 | The base value. |
Returns
number -
The percentage a is of b, between 0 and 1.
- Source code: math/Math.js (Line 1153)
Please login to continue.