Struct visioncortex::Point2 [−][src]
Generic point in 2D space
Fields
x: T
y: T
Implementations
impl<T> Point2<T>
[src]
impl<T> Point2<T> where
T: Add<Output = T> + Mul<Output = T>,
[src]
T: Add<Output = T> + Mul<Output = T>,
impl<T> Point2<T> where
T: Float,
[src]
T: Float,
pub fn rotate(&self, origin: Self, angle: T) -> Self
[src]
pub fn translate(self, vector: Self) -> Self
[src]
pub fn norm(self) -> T
[src]
impl Point2<i32>
[src]
pub fn to_point_f64(&self) -> PointF64
[src]
impl Point2<f64>
[src]
pub fn to_point_i32(&self) -> PointI32
[src]
pub fn to_point_f32(&self) -> PointF32
[src]
Trait Implementations
impl<T> Add<Point2<T>> for Point2<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl<T> AddAssign<Point2<T>> for Point2<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: Self)
[src]
impl<T: Clone> Clone for Point2<T>
[src]
impl<T: Copy> Copy for Point2<T>
[src]
impl<T: Debug> Debug for Point2<T>
[src]
impl<T: Default> Default for Point2<T>
[src]
impl<T: Eq> Eq for Point2<T>
[src]
impl<T> Neg for Point2<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<T: PartialEq> PartialEq<Point2<T>> for Point2<T>
[src]
impl<T> StructuralEq for Point2<T>
[src]
impl<T> StructuralPartialEq for Point2<T>
[src]
impl<T> Sub<Point2<T>> for Point2<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl<T> SubAssign<Point2<T>> for Point2<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: Self)
[src]
impl<T> ToSvgString for Point2<T> where
T: Display,
[src]
T: Display,
fn to_svg_string(&self) -> String
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Point2<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Point2<T> where
T: Send,
T: Send,
impl<T> Sync for Point2<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Point2<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Point2<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub 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>,