mirror of https://github.com/zcash/halo2.git
Merge pull request #292 from zcash/expression-square
plonk::circuit.rs: Add Expression::square() method.
This commit is contained in:
commit
d04b532368
|
@ -427,6 +427,11 @@ impl<F: Field> Expression<F> {
|
|||
Expression::Scaled(poly, _) => poly.degree(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Square this expression.
|
||||
pub fn square(self) -> Self {
|
||||
self.clone() * self
|
||||
}
|
||||
}
|
||||
|
||||
impl<F: Field> Neg for Expression<F> {
|
||||
|
|
Loading…
Reference in New Issue