RescaleSlopeAndIntercept
Source: rsi.js:4
Rescale Slope and Intercept.
Constructor
new RescaleSlopeAndIntercept(
slope: number,
intercept: number,
): RescaleSlopeAndInterceptParameters
slope(number) — The slope of the RSI.intercept(number) — The intercept of the RSI.
Instance Methods
getSlope(): number
Get the slope of the RSI.
Returns
number— The slope of the RSI.
getIntercept(): number
Get the intercept of the RSI.
Returns
number— The intercept of the RSI.
apply(value: number): number
Apply the RSI on an input value.
Parameters
value(number) — The input value.
Returns
number— The value to rescale.
equals(rhs: RescaleSlopeAndIntercept): boolean
Check for RSI equality.
Parameters
rhs(RescaleSlopeAndIntercept) — The other RSI to compare to.
Returns
boolean— True if both RSI are equal.
isID(): boolean
Is this RSI an ID RSI.
Returns
boolean— True if the RSI has a slope of 1 and no intercept.