LinearModifier
LinearModifier
Linear polynomial modifier in form of : a*x + b
Kind: global class
- LinearModifier
- new LinearModifier([a], [b])
- instance
- .a :
number - .b :
number - .source :
number - .transient :
boolean - .copy(other)
- .clone() ⇒
LinearModifier - .add(other)
- .equals(other) ⇒
boolean - .hash() ⇒
number
- .a :
- static
new LinearModifier([a], [b])
| Param | Type | Default | Description |
|---|---|---|---|
| [a] | number | 1 | gradient (slope) |
| [b] | number | 0 | constant (intercept) |
Example
if x is 5, and modifier a=3 and b=7 then we get 3*5 + 7 = 23
linearModifier.a : number
gradient (slope)
Kind: instance property of LinearModifier
Read only: true
linearModifier.b : number
constant (intercept)
Kind: instance property of LinearModifier
Read only: true
linearModifier.source : number
Kind: instance property of LinearModifier
linearModifier.transient : boolean
Whenever this modifier is grated by another persistent effect
Kind: instance property of LinearModifier
linearModifier.copy(other)
Kind: instance method of LinearModifier
| Param | Type |
|---|---|
| other | LinearModifier |
linearModifier.clone() ⇒ LinearModifier
Kind: instance method of LinearModifier
linearModifier.add(other)
Combines other modifier onto this one.
Kind: instance method of LinearModifier
| Param | Type |
|---|---|
| other | LinearModifier |
linearModifier.equals(other) ⇒ boolean
Kind: instance method of LinearModifier
| Param | Type |
|---|---|
| other | LinearModifier |
linearModifier.hash() ⇒ number
Kind: instance method of LinearModifier
LinearModifier.CONSTANT_ONE : LinearModifier
Kind: static property of LinearModifier
Read only: true
LinearModifier.CONSTANT_ZERO : LinearModifier
Kind: static property of LinearModifier
Read only: true