Skip to main content

LinearModifier

LinearModifier

Linear polynomial modifier in form of : a*x + b

Kind: global class

new LinearModifier([a], [b])

ParamTypeDefaultDescription
[a]number1gradient (slope)
[b]number0constant (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

ParamType
otherLinearModifier

linearModifier.clone() ⇒ LinearModifier

Kind: instance method of LinearModifier

linearModifier.add(other)

Combines other modifier onto this one.

Kind: instance method of LinearModifier

ParamType
otherLinearModifier

linearModifier.equals(other) ⇒ boolean

Kind: instance method of LinearModifier

ParamType
otherLinearModifier

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