[−][src]Struct sss_rs::geometry::point::Point
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.
fn sub(self, rhs: Point) -> Self::Output
[src]
impl<'_> Sub<&'_ Point> for Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, rhs: &Point) -> Self::Output
[src]
impl<'_> Sub<Point> for &'_ Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, rhs: Point) -> Self::Output
[src]
impl<'_, '_> Sub<&'_ Point> for &'_ Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, rhs: &Point) -> Self::Output
[src]
impl Add<Point> for Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, rhs: Point) -> Self::Output
[src]
impl<'_> Add<&'_ Point> for Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, rhs: &Point) -> Self::Output
[src]
impl<'_> Add<Point> for &'_ Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, rhs: Point) -> Self::Output
[src]
impl<'_, '_> Add<&'_ Point> for &'_ Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, rhs: &Point) -> Self::Output
[src]
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,