Skip to content

Commit

Permalink
fix PartialEq for ProjectivePoint
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Feb 18, 2024
1 parent 2251813 commit 867ada2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions starknet-curve/src/ec_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,8 @@ impl PartialEq for ProjectivePoint {
// An infinity point is not equal to a non-infinity point
false
} else {
// Calculate the inverse of z-coordinates
let z1inv = self.z.invert().unwrap();
let z2inv = other.z.invert().unwrap();

// Compare the affine coordinates after applying the inverse of z-coordinates
self.x * z1inv == other.x * z2inv && self.y * z1inv == other.y * z2inv
self.x * other.z == other.x * self.z && self.y * other.z == other.y * self.z
}
}
}
Expand Down

0 comments on commit 867ada2

Please sign in to comment.