getCurrentResistance()

in frontend/src/lib/racer.js [44:48]


  getCurrentResistance(pctComplete) {
    if (pctComplete < 0 || pctComplete > 1) throw new Error('pctComplete out of range: 0-1 expected')
    // Racer will trend from _thisRaceminResistance to _thisRacemaxResistance over the course of the race.
    return ((this._thisRacemaxResistance - this._thisRaceminResistance) * pctComplete) + this._thisRaceminResistance
  }