Skip to content

Commit

Permalink
polys have degree not size
Browse files Browse the repository at this point in the history
  • Loading branch information
xoloki committed Oct 8, 2024
1 parent 020d5e8 commit 39c117f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ impl<
Arg: Clone + One + Mul<Param> + MulAssign,
> Polynomial<Param, Arg>
{
/// construct new random polynomial of the specified size
/// construct new random polynomial of the specified degree
pub fn random<RNG: RngCore + CryptoRng>(n: usize, rng: &mut RNG) -> Self {
let params = (0..n).map(|_| Param::fill(rng)).collect::<Vec<Param>>();
let params = (0..n + 1).map(|_| Param::fill(rng)).collect::<Vec<Param>>();
Self {
params,
_x: std::marker::PhantomData,
Expand Down

0 comments on commit 39c117f

Please sign in to comment.