LinearFunction¶
Overview¶
Function for doing a linear mapping between two domains ('a' and 'b'). <p> Example usage: <code> var f = new LinearFunction( 0, 100, 0, 200 ); f.evaluate( 50 ); // 100 f.inverse( 100 ); // 50 </code>
@author Chris Malley (PixelZoom, Inc.)
Class LinearFunction¶
Constructor¶
new LinearFunction( a1 : number, a2 : number, b1 : number, b2 : number, clamp )¶
Instance Methods¶
evaluate( a3 : number ) : number¶
Maps from a to b.
inverse( b3 : number ) : number¶
Maps from b to a
Source Code¶
See the source for LinearFunction.ts in the dot repository.