Constructor
new ExponentialProgression(base, scale)
Creates an instance of ExponentialProgression. The series is calculated
like this: { 0, base ^ 0 * scale, base ^ 1 * scale, base ^ 2 * scale, ... }.
Example
// Exponential progression with base 2, scale 1
new tngs.ExponentialProgression(2, 1) // 0, 1, 2, 4, 8, ...
// Exponential progression with base 1.5, scale 0.5
new tngs.ExponentialProgression(1.5, 0.5) // 0.0, 0.5, 0.75, 1.125, 1.6875, ...
Parameters:
Name | Type | Description |
---|---|---|
base |
number | The base of the function. Must be > 1.0. |
scale |
number | The scale of the function. Must be > 0.0. |
Extends
Methods
Advance()
Moves to the next value in the series.
Reset()
Puts the progression in its initial state (_value = 0).
- Source:
- Overrides: