Skip to content

Commit

Permalink
Add constructor to Coordinates struct
Browse files Browse the repository at this point in the history
  • Loading branch information
kilic committed Mar 6, 2022
1 parent 230e2c6 commit 530f4c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/arithmetic/curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ pub struct Coordinates<C: CurveAffine> {
}

impl<C: CurveAffine> Coordinates<C> {
// Crates new coordinates
pub fn new(x: C::Base, y: C::Base) -> Self {
Self { x, y }
}

/// Returns the x-coordinate.
///
/// Equivalent to `Coordinates::u`.
Expand Down

0 comments on commit 530f4c0

Please sign in to comment.