mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-09 07:21:29 +01:00
identity -> zero for Affine
This commit is contained in:
@@ -209,7 +209,7 @@ where
|
|||||||
let (x, y, z) = match f() {
|
let (x, y, z) = match f() {
|
||||||
Ok(ge) => {
|
Ok(ge) => {
|
||||||
let ge = ge.into_affine();
|
let ge = ge.into_affine();
|
||||||
if ge.is_identity() {
|
if ge.is_zero() {
|
||||||
(
|
(
|
||||||
Ok(P::BaseField::zero()),
|
Ok(P::BaseField::zero()),
|
||||||
Ok(P::BaseField::one()),
|
Ok(P::BaseField::one()),
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ where
|
|||||||
.double()
|
.double()
|
||||||
.into_affine();
|
.into_affine();
|
||||||
// Panic if the result is zero.
|
// Panic if the result is zero.
|
||||||
assert!(!result.is_identity());
|
assert!(!result.is_zero());
|
||||||
Ok(Self::new(F::constant(result.x), F::constant(result.y)))
|
Ok(Self::new(F::constant(result.x), F::constant(result.y)))
|
||||||
} else {
|
} else {
|
||||||
let (x1, y1) = (&self.x, &self.y);
|
let (x1, y1) = (&self.x, &self.y);
|
||||||
|
|||||||
Reference in New Issue
Block a user