mirror of
https://github.com/status-im/codex-contracts-eth.git
synced 2025-01-31 02:35:36 +00:00
Remove unnecessary if-statement
This commit is contained in:
parent
949909fd98
commit
3840e2bf92
@ -27,8 +27,7 @@ library Pairing {
|
||||
|
||||
/// The negation of p, i.e. p.addition(p.negate()) should be zero.
|
||||
function negate(G1Point memory p) internal pure returns (G1Point memory) {
|
||||
if (p.x == 0 && p.y == 0) return G1Point(0, 0);
|
||||
return G1Point(p.x, _Q - (p.y % _Q));
|
||||
return G1Point(p.x, (_Q - p.y) % _Q);
|
||||
}
|
||||
|
||||
/// The sum of two points of G1
|
||||
|
Loading…
x
Reference in New Issue
Block a user