Skip to content

Commit

Permalink
Merge pull request #4 from arkpar/master
Browse files Browse the repository at this point in the history
Added iz_zero for Fq2
  • Loading branch information
NikVolf authored Sep 8, 2017
2 parents f121cb5 + c386e20 commit c9831a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ impl Fq2 {
pub fn new(a: Fq, b: Fq) -> Fq2 {
Fq2(fields::Fq2::new(a.0, b.0))
}

pub fn is_zero(&self) -> bool {
self.0.is_zero()
}
}

pub trait Group:
Expand Down Expand Up @@ -399,4 +403,4 @@ impl From<AffineG2> for G2 {
fn from(affine: AffineG2) -> Self {
G2(affine.0.to_jacobian())
}
}
}

0 comments on commit c9831a8

Please sign in to comment.