[][src]Struct sss_rs::geometry::point::Point

pub struct Point { /* fields omitted */ }

A point structure that uses fractional values so that it can represent whole and non-whole numbers without the need for truncating.

Methods

impl Point[src]

pub fn new<T: Into<Fraction>, S: Into<Fraction>>(x: T, y: S) -> Self[src]

Creates a point from two values that impl Into

pub fn add_point(self, rhs: Point) -> Self[src]

pub fn sub_point(self, rhs: Point) -> Self[src]

pub fn scale(self, scalar: i64) -> Self[src]

pub fn x(&self) -> Fraction[src]

pub fn y(&self) -> Fraction[src]

Trait Implementations

impl Clone for Point[src]

impl Copy for Point[src]

impl Default for Point[src]

impl Eq for Point[src]

impl PartialEq<Point> for Point[src]

impl Display for Point[src]

impl Debug for Point[src]

impl Sub<Point> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl<'_> Sub<&'_ Point> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl<'_> Sub<Point> for &'_ Point[src]

type Output = Point

The resulting type after applying the - operator.

impl<'_, '_> Sub<&'_ Point> for &'_ Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Add<Point> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl<'_> Add<&'_ Point> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl<'_> Add<Point> for &'_ Point[src]

type Output = Point

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ Point> for &'_ Point[src]

type Output = Point

The resulting type after applying the + operator.

impl StructuralPartialEq for Point[src]

impl StructuralEq for Point[src]

Auto Trait Implementations

impl Send for Point

impl Sync for Point

impl Unpin for Point

impl UnwindSafe for Point

impl RefUnwindSafe for Point

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]