Namespace: math

D.math

Mathematical Utilities library

Example

D.math

Methods

(static) percent(actual, maximum) → {number}

Percentage Calculating Function
Parameters:
Name Type Description
actual number The actual number
maximum number The maximum number
Returns:
- The Percentage
Type
number
Example
// returns 70
D.math.percent(7, 10)