Demote a docstring note to inline code comment to avoid confusing users.

This commit is contained in:
Isis Lovecruft 2017-03-04 05:29:19 +00:00
parent cfd0e8ad6e
commit 2c83d48cfa
Failed to extract signature

View file

@ -210,15 +210,11 @@ impl CompressedMontgomeryU {
/// Given a Montgomery `u` coordinate, compute an Edwards `y` via
/// `y = (u-1)/(u+1)`.
///
/// # Note
///
/// Since `u = (1+y)/(1-y)` and `v = √(u(u²+Au+1))`, we can see that
/// `y = (u-1)/(u+1)`.
///
/// # Return
///
/// A `FieldElement` corresponding to this coordinate, but in Edwards form.
fn to_edwards_y(u: &FieldElement) -> FieldElement {
// Since `u = (1+y)/(1-y)` and `v = √(u(u²+Au+1))`, so `y = (u-1)/(u+1)`.
&(u - &FieldElement::one()) * &(u + &FieldElement::one()).invert()
}