pub struct AffinePoint {
pub(crate) x: FieldElement,
pub(crate) y: FieldElement,
}Expand description
This point representation is not a part of the API.
AffinePoint is mainly used as a convenience struct. XXX: Initially, I wanted to leave some of these in the library to help others learn. So if you are scrubbing the commit history. Hopefully they were helpful.
Represents an AffinePoint on the Twisted Edwards Curve with Equation y^2 - x^2 = 1 - (TWISTED_D) * x^2 * y^2
Fields§
§x: FieldElement§y: FieldElementImplementations§
Source§impl AffinePoint
impl AffinePoint
Sourcepub(crate) const IDENTITY: AffinePoint
pub(crate) const IDENTITY: AffinePoint
Identity element
Sourcepub(crate) fn is_on_curve(&self) -> Choice
pub(crate) fn is_on_curve(&self) -> Choice
Checks if the AffinePoint is on the TwistedEdwards curve
pub(crate) fn negate(&self) -> AffinePoint
Sourcepub(crate) fn add(&self, other: &AffinePoint) -> AffinePoint
pub(crate) fn add(&self, other: &AffinePoint) -> AffinePoint
Adds an AffinePoint onto an AffinePoint
Sourcepub(crate) fn to_extensible(self) -> ExtensiblePoint
pub(crate) fn to_extensible(self) -> ExtensiblePoint
Converts an AffinePoint to an ExtensiblePoint
Sourcepub(crate) fn to_extended(self) -> ExtendedPoint
pub(crate) fn to_extended(self) -> ExtendedPoint
Converts an An AffinePoint to an ExtendedPoint
Trait Implementations§
Source§impl Clone for AffinePoint
impl Clone for AffinePoint
Source§fn clone(&self) -> AffinePoint
fn clone(&self) -> AffinePoint
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 AffinePoint
impl Debug for AffinePoint
Source§impl Default for AffinePoint
impl Default for AffinePoint
Source§fn default() -> AffinePoint
fn default() -> AffinePoint
Returns the “default value” for a type. Read more
Source§impl PartialEq for AffinePoint
impl PartialEq for AffinePoint
impl Copy for AffinePoint
impl Eq for AffinePoint
impl StructuralPartialEq for AffinePoint
Auto Trait Implementations§
impl Freeze for AffinePoint
impl RefUnwindSafe for AffinePoint
impl Send for AffinePoint
impl Sync for AffinePoint
impl Unpin for AffinePoint
impl UnsafeUnpin for AffinePoint
impl UnwindSafe for AffinePoint
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