Struct mutils::Point [−][src]
Implementations
impl<N: Num> Point<N>
[src]
pub fn x(&self) -> N
[src]
pub fn y(&self) -> N
[src]
pub fn move_x(&mut self, x: N)
[src]
pub fn move_y(&mut self, y: N)
[src]
pub fn set_x(&mut self, x: N)
[src]
pub fn set_y(&mut self, y: N)
[src]
pub fn rect_to(&self, other: Self) -> Rect<N>
[src]
pub fn distance_to(&self, other: Self) -> Size<N>
[src]
impl<N: Num> Point<N>
[src]
pub fn to_clamped<T: Num + FromClamped<N>>(&self) -> Point<T>
[src]
Converts to a new type. If the current values don't fit in the new type,
then it'll be clamped between min and max.
i.e. NumTuple::new(1 as i16, 1 as i16)::to::<u16>()
pub fn to<T: Num + From<N>>(&self) -> Point<T>
[src]
This is to allow creating a new Point, with a new type, from the type given.
i.e. Point::new(1 as u8, 1 as u8)::to::<u32>()
impl<N: Num + Signed> Point<N>
[src]
pub fn sign(&self) -> Self
[src]
pub fn sign_exclusive_dir(&self) -> Self
[src]
impl Point<f32>
[src]
pub fn overlaps(self, Point(w, h): Self, xy1: Self, xy2: Self) -> bool
[src]
pub fn floor(self) -> Self
[src]
pub fn ceil(self) -> Self
[src]
pub fn round(self) -> Self
[src]
Trait Implementations
impl<N: Num> Add<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Point<N>) -> Self
[src]
impl<N: Num> Add<Point<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl<N: Num> Add<Point<N>> for Rect<N>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Point<N>) -> Self
[src]
impl Add<Point<f32>> for Random
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, Point(x, y): Point) -> Point
[src]
impl<N: Num> Add<Size<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Size<N>) -> Self
[src]
impl<N: Num> AddAssign<Point<N>> for Line<N>
[src]
fn add_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> AddAssign<Point<N>> for Point<N>
[src]
fn add_assign(&mut self, other: Self)
[src]
impl<N: Num> AddAssign<Point<N>> for Rect<N>
[src]
fn add_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> AddAssign<Size<N>> for Point<N>
[src]
fn add_assign(&mut self, other: Size<N>)
[src]
impl<N: Clone + Num> Clone for Point<N>
[src]
impl<N: Copy + Num> Copy for Point<N>
[src]
impl<N: Debug + Num> Debug for Point<N>
[src]
impl<N: Num> Div<N> for Point<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: N) -> Self
[src]
impl<N: Num> Div<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Point<N>) -> Self
[src]
impl<N: Num> Div<Point<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl<N: Num> Div<Size<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Size<N>) -> Self
[src]
impl<N: Num> DivAssign<N> for Point<N>
[src]
fn div_assign(&mut self, other: N)
[src]
impl<N: Num> DivAssign<Point<N>> for Line<N>
[src]
fn div_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> DivAssign<Point<N>> for Point<N>
[src]
fn div_assign(&mut self, other: Self)
[src]
impl<N: Num> DivAssign<Size<N>> for Point<N>
[src]
fn div_assign(&mut self, other: Size<N>)
[src]
impl<N: Num> From<(N, N)> for Point<N>
[src]
impl From<Point<f32>> for Transform
[src]
impl<V: Copy> Index<Point<usize>> for Vec2D<V>
[src]
impl<V: Copy> IndexMut<Point<usize>> for Vec2D<V>
[src]
impl<N: Num> Into<(N, N)> for Point<N>
[src]
impl<N: Num> Mul<N> for Point<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: N) -> Self
[src]
impl<N: Num> Mul<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Point<N>) -> Self
[src]
impl<N: Num> Mul<Point<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl<N: Num> Mul<Size<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Size<N>) -> Self
[src]
impl<N: Num> MulAssign<N> for Point<N>
[src]
fn mul_assign(&mut self, other: N)
[src]
impl<N: Num> MulAssign<Point<N>> for Line<N>
[src]
fn mul_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> MulAssign<Point<N>> for Point<N>
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl<N: Num> MulAssign<Size<N>> for Point<N>
[src]
fn mul_assign(&mut self, other: Size<N>)
[src]
impl<N: Num + Signed> Neg for Point<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<N: Num> NumTuple<N> for Point<N>
[src]
fn new(x: N, y: N) -> Self
[src]
fn first(&self) -> N
[src]
fn second(&self) -> N
[src]
fn set_first(&mut self, n: N)
[src]
fn set_second(&mut self, n: N)
[src]
fn set(&mut self, first: N, second: N)
[src]
fn get(&mut self) -> (N, N)
[src]
fn min(self, other: Self) -> Self
[src]
fn max(self, other: Self) -> Self
[src]
fn max_from_zero(self, other: Self) -> Self
[src]
fn abs(&self) -> Self
[src]
fn is_outside(self, xy1: Self, xy2: Self) -> bool
[src]
fn is_inside(self, xy1: Self, xy2: Self) -> bool
[src]
impl<N: Num> PartialEq<Point<N>> for Point<N>
[src]
impl<N: Num> Rem<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Point<N>) -> Self
[src]
impl<N: Num> Rem<Point<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
[src]
impl<N: Num> Sub<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Point<N>) -> Self
[src]
impl<N: Num> Sub<Point<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl<N: Num> Sub<Point<N>> for Rect<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Point<N>) -> Self
[src]
impl Sub<Point<f32>> for Random
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, Point(x, y): Point) -> Point
[src]
impl<N: Num> Sub<Size<N>> for Point<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Size<N>) -> Self
[src]
impl<N: Num> SubAssign<Point<N>> for Line<N>
[src]
fn sub_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> SubAssign<Point<N>> for Point<N>
[src]
fn sub_assign(&mut self, other: Self)
[src]
impl<N: Num> SubAssign<Point<N>> for Rect<N>
[src]
fn sub_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> SubAssign<Size<N>> for Point<N>
[src]
fn sub_assign(&mut self, other: Size<N>)
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Point<N> where
N: RefUnwindSafe,
[src]
N: RefUnwindSafe,
impl<N> Send for Point<N> where
N: Send,
[src]
N: Send,
impl<N> Sync for Point<N> where
N: Sync,
[src]
N: Sync,
impl<N> Unpin for Point<N> where
N: Unpin,
[src]
N: Unpin,
impl<N> UnwindSafe for Point<N> where
N: UnwindSafe,
[src]
N: 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, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
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>,