LinearEquationPlot¶
Overview¶
LinearEquationPlot plots a straight line, described by y = mx + b. This was created for the Google Group discussion in https://groups.google.com/g/developing-interactive-simulations-in-html5/c/k9P78WZivJ4.
@author Chris Malley (PixelZoom, Inc.)
Class LinearEquationPlot¶
Constructor¶
new LinearEquationPlot( chartTransform : ChartTransform, m : number, b : number, providedOptions? : LinearEquationPlotOptions )¶
Instance Methods¶
setSlope( m : number )¶
Sets the slope and redraws the plot
setYIntercept( b : number )¶
Sets the y-intercept and redraws the plot.
solve( x : number ) : number¶
Solves for y.
dispose()¶
Type LinearEquationPlotOptions¶
Source Code¶
See the source for LinearEquationPlot.ts in the bamboo repository.