Skip to content

Commit 510ccf3

Browse files
committed
forge fmt
1 parent c650fad commit 510ccf3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libraries/CurveLib.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ library CurveLib {
5151
uint256 C;
5252
uint256 fourAC;
5353
unchecked {
54-
B = int256((py * (y - y0) + (px - 1)) / px) - (2 * int256(c) - int256(1e18)) * int256(x0) / 1e18;
54+
B = int256((py * (y - y0) + (px - 1)) / px) - (2 * int256(c) - int256(1e18)) * int256(x0) / 1e18;
5555
if (x0 >= 1e18) {
5656
// if x0 >= 1, scale as normal
5757
C = Math.mulDiv((1e18 - c), x0 * x0, 1e36, Math.Rounding.Ceil);
@@ -62,7 +62,7 @@ library CurveLib {
6262
fourAC = Math.mulDiv(4 * c, C, 1e18, Math.Rounding.Ceil);
6363
}
6464
}
65-
65+
6666
uint256 absB = uint256(B >= 0 ? B : -B);
6767
uint256 squaredB;
6868
uint256 discriminant;
@@ -74,7 +74,7 @@ library CurveLib {
7474
discriminant = squaredB + fourAC; // keep in 1e36 scale for increased precision ahead of sqrt
7575
sqrt = Math.sqrt(discriminant); // drop back to 1e18 scale
7676
sqrt = (sqrt * sqrt < discriminant) ? sqrt + 1 : sqrt;
77-
}
77+
}
7878
} else {
7979
// use scaled, overflow-safe path
8080
uint256 scale = computeScale(absB);
@@ -110,7 +110,7 @@ library CurveLib {
110110

111111
// 2^excessBits is how much we need to scale down to prevent overflow when squaring x
112112
if (bits > 128) {
113-
uint256 excessBits = bits - 128;
113+
uint256 excessBits = bits - 128;
114114
scale = 1 << excessBits;
115115
} else {
116116
scale = 1;

0 commit comments

Comments
 (0)