mirror of
https://github.com/pezkuwichain/bizinikiwi-bn.git
synced 2026-07-24 22:55:49 +00:00
real/imagianry part exposure
This commit is contained in:
@@ -92,6 +92,14 @@ impl Fq2 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn real(&self) -> &Fq {
|
||||
&self.c0
|
||||
}
|
||||
|
||||
pub fn imaginary(&self) -> &Fq {
|
||||
&self.c1
|
||||
}
|
||||
}
|
||||
|
||||
impl FieldElement for Fq2 {
|
||||
|
||||
@@ -215,6 +215,14 @@ impl Fq2 {
|
||||
pub fn pow(&self, exp: arith::U256) -> Self {
|
||||
Fq2(self.0.pow(exp))
|
||||
}
|
||||
|
||||
pub fn real(&self) -> Fq {
|
||||
Fq(*self.0.real())
|
||||
}
|
||||
|
||||
pub fn imaginary(&self) -> Fq {
|
||||
Fq(*self.0.imaginary())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user