Refactor flipForecastForecast (#437)

Algebraic reduction of Stock.flipForecastForecast() to make it more readable.
This commit is contained in:
Eric
2023-03-21 17:36:54 -07:00
committed by GitHub
parent 98f7f473b4
commit 39d26673c4

View File

@ -213,8 +213,7 @@ export class Stock {
* RL stock market cycles and introduce volatility
*/
flipForecastForecast(): void {
const diff = this.otlkMagForecast - 50;
this.otlkMagForecast = 50 + -1 * diff;
this.otlkMagForecast = 100 - this.otlkMagForecast;
}
/** Returns the stock's absolute forecast, which is a number between 0-100 */