Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pefontana committed Oct 26, 2023
1 parent 15bed72 commit 971bef6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/starknet-types-core/src/curve/projective_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ impl ProjectivePoint {
}

/// Creates the same point in affine coordinates. That is,
/// returns [x / z: y / z: 1] where `self` is [x: y: z].
/// returns (x * inv_z, y* inv_z, 1)
/// where `self` is the point (x, y, z) and inv_z is the multiplicative inverse of z
pub fn to_affine(&self) -> Result<AffinePoint, CurveError> {
if self.z() == Felt::ZERO {
return Err(CurveError::EllipticCurveError(InvalidPoint));
Expand Down

0 comments on commit 971bef6

Please sign in to comment.