pub struct ProjectivePoint {
pub X: FieldElement51,
pub Y: FieldElement51,
pub Z: FieldElement51,
}Expand description
A ProjectivePoint is a point \((X:Y:Z)\) on the \(\mathbb
P^2\) model of the curve.
A point \((x,y)\) in the affine model corresponds to
\((x:y:1)\).
More details on the relationships between the different curve models can be found in the module-level documentation.
Fields§
§X: FieldElement51§Y: FieldElement51§Z: FieldElement51Implementations§
Source§impl ProjectivePoint
impl ProjectivePoint
Sourcepub fn as_extended(&self) -> EdwardsPoint
pub fn as_extended(&self) -> EdwardsPoint
Convert this point from the \( \mathbb P^2 \) model to the \( \mathbb P^3 \) model.
This costs \(3 \mathrm M + 1 \mathrm S\).
Source§impl ProjectivePoint
impl ProjectivePoint
Sourcepub fn double(&self) -> CompletedPoint
pub fn double(&self) -> CompletedPoint
Double this point: return self + self
Trait Implementations§
Source§impl Clone for ProjectivePoint
impl Clone for ProjectivePoint
Source§fn clone(&self) -> ProjectivePoint
fn clone(&self) -> ProjectivePoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectivePoint
impl Debug for ProjectivePoint
Source§impl Identity for ProjectivePoint
impl Identity for ProjectivePoint
Source§fn identity() -> ProjectivePoint
fn identity() -> ProjectivePoint
Returns the identity element of the curve.
Can be used as a constructor.
Source§impl ValidityCheck for ProjectivePoint
impl ValidityCheck for ProjectivePoint
impl Copy for ProjectivePoint
Auto Trait Implementations§
impl Freeze for ProjectivePoint
impl RefUnwindSafe for ProjectivePoint
impl Send for ProjectivePoint
impl Sync for ProjectivePoint
impl Unpin for ProjectivePoint
impl UnwindSafe for ProjectivePoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more