Skip to content

Commit

Permalink
Remove AffinePoint operations
Browse files Browse the repository at this point in the history
  • Loading branch information
pefontana committed Oct 25, 2023
1 parent abd9d51 commit 6bafc48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions crates/starknet-types-core/src/curve/affine_point.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use crate::curve::projective_point::ProjectivePoint;
use crate::felt::Felt;
use core::ops;
use lambdaworks_math::cyclic_group::IsGroup;
use lambdaworks_math::elliptic_curve::short_weierstrass::curves::stark_curve::StarkCurve;
use lambdaworks_math::elliptic_curve::short_weierstrass::point::ShortWeierstrassProjectivePoint;
use lambdaworks_math::elliptic_curve::traits::{EllipticCurveError, FromAffine};
use lambdaworks_math::unsigned_integer::traits::IsUnsignedInteger;

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AffinePoint(pub(crate) ShortWeierstrassProjectivePoint<StarkCurve>);
Expand Down
4 changes: 2 additions & 2 deletions crates/starknet-types-core/src/curve/projective_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +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].
/// Panics if `self` is the point at infinity.
pub fn to_affine_point(projective_point: &ProjectivePoint) -> AffinePoint {
AffinePoint(projective_point.0.to_affine())
pub fn to_affine(&self) -> AffinePoint {
AffinePoint(self.0.to_affine())
}

/// Returns the `x` coordinate of the point.
Expand Down

0 comments on commit 6bafc48

Please sign in to comment.