Skip to content

Commit 3525902

Browse files
committed
remove Ternary library for clarity
Spearbit #7
1 parent 6a3a84a commit 3525902

File tree

2 files changed

+1
-65
lines changed

2 files changed

+1
-65
lines changed

src/libraries/CurveLib.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
pragma solidity ^0.8.27;
1111

12-
import {Ternary} from "../math/Ternary.sol";
1312
import {UnsafeMath, Math} from "../math/UnsafeMath.sol";
1413
import {FullMath} from "../math/FullMath.sol";
1514
import {FastLogic} from "../math/FastLogic.sol";
@@ -19,7 +18,6 @@ import {Sqrt} from "../math/Sqrt.sol";
1918
import {IEulerSwap} from "../interfaces/IEulerSwap.sol";
2019

2120
library CurveLib {
22-
using Ternary for bool;
2321
using UnsafeMath for uint256;
2422
using UnsafeMath for int256;
2523
using Math for uint256;
@@ -128,7 +126,7 @@ library CurveLib {
128126
// 3814697265625 is 5e17 with all the trailing zero bits removed to make the
129127
// constant smaller. The argument of `saturatingSub` is reduced to compensate
130128
uint256 shiftFourAc = (x0 * 3814697265625).bitLength().saturatingSub(109);
131-
shift = (shiftSquaredB < shiftFourAc).ternary(shiftFourAc, shiftSquaredB);
129+
shift = shiftSquaredB < shiftFourAc ? shiftFourAc : shiftSquaredB;
132130
}
133131
uint256 twoShift = shift << 1;
134132

src/math/Ternary.sol

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)