Skip to content

Commit

Permalink
refactor: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Nov 9, 2023
1 parent 3eb9580 commit f3eaa08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SpeedJumpIrm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ contract AdaptativeCurveIrm is IIrm {
/// r = ((1-1/C)*err + 1) * rateAtTarget if err < 0
/// ((C-1)*err + 1) * rateAtTarget else.
function _curve(uint256 _rateAtTarget, int256 err) private view returns (uint256) {
uint256 steeringCoeff = err < 0 ? WAD - WAD.wDivDown(CURVE_STEEPNESS) : CURVE_STEEPNESS - WAD;
uint256 coeff = err < 0 ? WAD - WAD.wDivDown(CURVE_STEEPNESS) : CURVE_STEEPNESS - WAD;

// Safe "unchecked" cast because err >= -1 (in WAD).
return uint256(steeringCoeff.wMulDown(err) + WAD_INT).wMulDown(_rateAtTarget);
return uint256(coeff.wMulDown(err) + WAD_INT).wMulDown(_rateAtTarget);
}
}

0 comments on commit f3eaa08

Please sign in to comment.