Tuple Fields
0: N
1: N
Implementations
sourceimpl<N: Num> Point<N>
impl<N: Num> Point<N>
pub fn new_zero_value() -> Self
pub fn new_from_angle(angle: f32, hypot: f32) -> Self
pub fn move_from_angle(self, angle: f32, hypot: f32) -> Self
pub fn x(&self) -> N
pub fn y(&self) -> N
pub fn move_x(&mut self, x: N)
pub fn move_y(&mut self, y: N)
pub fn set_x(&mut self, x: N)
pub fn set_y(&mut self, y: N)
pub fn line_to(self, other: Self) -> Line<N>
pub fn rect_to(self, other: Self) -> Rect<N>
pub fn distance_to(self, other: Self) -> Size<N>
sourcepub fn to<T: Num + From<N>>(&self) -> Point<T>
pub fn to<T: Num + From<N>>(&self) -> Point<T>
This is to allow creating a new Point, which wraps a different number type.
For example Point(1u8, 2u8)::to::<u32>()
creates a Point(1u32, 2u32)
.
pub fn abs(&self) -> Self
pub fn min(self, other: Self) -> Self
pub fn max(self, other: Self) -> Self
pub fn hypot_to(self, other: Point<N>) -> N
pub fn rotate_around_point(self, angle: f32, other: Self) -> Self
pub fn rotate_around_zero(self, rotation: f32) -> Self
pub fn angle_to(self, other: Self) -> f32
pub fn interpolate_to(self, other: Point<N>, n: N) -> Point<N>
sourceimpl<N: Num + ToSignedClamped> Point<N>
impl<N: Num + ToSignedClamped> Point<N>
pub fn to_signed_clamped(self) -> Point<<N as ToSignedClamped>::Output>
Trait Implementations
sourceimpl<N: Num> AddAssign<Point<N>> for Circle<N>
impl<N: Num> AddAssign<Point<N>> for Circle<N>
sourcefn add_assign(&mut self, other: Point<N>)
fn add_assign(&mut self, other: Point<N>)
Performs the +=
operation. Read more
sourceimpl<N: Num> AddAssign<Point<N>> for Line<N>
impl<N: Num> AddAssign<Point<N>> for Line<N>
sourcefn add_assign(&mut self, other: Point<N>)
fn add_assign(&mut self, other: Point<N>)
Performs the +=
operation. Read more
sourceimpl<N: Num> AddAssign<Point<N>> for Point<N>
impl<N: Num> AddAssign<Point<N>> for Point<N>
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the +=
operation. Read more
sourceimpl<N: Num> AddAssign<Point<N>> for Rect<N>
impl<N: Num> AddAssign<Point<N>> for Rect<N>
sourcefn add_assign(&mut self, other: Point<N>)
fn add_assign(&mut self, other: Point<N>)
Performs the +=
operation. Read more
sourceimpl<N: Num> AddAssign<Size<N>> for Point<N>
impl<N: Num> AddAssign<Size<N>> for Point<N>
sourcefn add_assign(&mut self, other: Size<N>)
fn add_assign(&mut self, other: Size<N>)
Performs the +=
operation. Read more
sourceimpl<N: Num> DivAssign<N> for Point<N>
impl<N: Num> DivAssign<N> for Point<N>
sourcefn div_assign(&mut self, other: N)
fn div_assign(&mut self, other: N)
Performs the /=
operation. Read more
sourceimpl<N: Num> DivAssign<Point<N>> for Line<N>
impl<N: Num> DivAssign<Point<N>> for Line<N>
sourcefn div_assign(&mut self, other: Point<N>)
fn div_assign(&mut self, other: Point<N>)
Performs the /=
operation. Read more
sourceimpl<N: Num> DivAssign<Point<N>> for Point<N>
impl<N: Num> DivAssign<Point<N>> for Point<N>
sourcefn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the /=
operation. Read more
sourceimpl<N: Num> DivAssign<Size<N>> for Point<N>
impl<N: Num> DivAssign<Size<N>> for Point<N>
sourcefn div_assign(&mut self, other: Size<N>)
fn div_assign(&mut self, other: Size<N>)
Performs the /=
operation. Read more
sourceimpl<N: Num> MulAssign<N> for Point<N>
impl<N: Num> MulAssign<N> for Point<N>
sourcefn mul_assign(&mut self, other: N)
fn mul_assign(&mut self, other: N)
Performs the *=
operation. Read more
sourceimpl<N: Num> MulAssign<Point<N>> for Line<N>
impl<N: Num> MulAssign<Point<N>> for Line<N>
sourcefn mul_assign(&mut self, other: Point<N>)
fn mul_assign(&mut self, other: Point<N>)
Performs the *=
operation. Read more
sourceimpl<N: Num> MulAssign<Point<N>> for Point<N>
impl<N: Num> MulAssign<Point<N>> for Point<N>
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the *=
operation. Read more
sourceimpl<N: Num> MulAssign<Size<N>> for Point<N>
impl<N: Num> MulAssign<Size<N>> for Point<N>
sourcefn mul_assign(&mut self, other: Size<N>)
fn mul_assign(&mut self, other: Size<N>)
Performs the *=
operation. Read more
sourceimpl<N: Num> NumTuple<N> for Point<N>
impl<N: Num> NumTuple<N> for Point<N>
fn new(x: N, y: N) -> Self
fn first(&self) -> N
fn second(&self) -> N
fn set_first(&mut self, n: N)
fn set_second(&mut self, n: N)
fn set(&mut self, first: N, second: N)
fn get(&mut self) -> (N, N)
fn min(self, other: Self) -> Self
fn max(self, other: Self) -> Self
fn is_outside(self, xy1: Self, xy2: Self) -> bool
fn is_inside(self, xy1: Self, xy2: Self) -> bool
sourceimpl<N: INum> ShlAssign<N> for Point<N>
impl<N: INum> ShlAssign<N> for Point<N>
sourcefn shl_assign(&mut self, other: N)
fn shl_assign(&mut self, other: N)
Performs the <<=
operation. Read more
sourceimpl<N: INum> ShrAssign<N> for Point<N>
impl<N: INum> ShrAssign<N> for Point<N>
sourcefn shr_assign(&mut self, other: N)
fn shr_assign(&mut self, other: N)
Performs the >>=
operation. Read more
sourceimpl<N: Num> SubAssign<Point<N>> for Circle<N>
impl<N: Num> SubAssign<Point<N>> for Circle<N>
sourcefn sub_assign(&mut self, other: Point<N>)
fn sub_assign(&mut self, other: Point<N>)
Performs the -=
operation. Read more
sourceimpl<N: Num> SubAssign<Point<N>> for Line<N>
impl<N: Num> SubAssign<Point<N>> for Line<N>
sourcefn sub_assign(&mut self, other: Point<N>)
fn sub_assign(&mut self, other: Point<N>)
Performs the -=
operation. Read more
sourceimpl<N: Num> SubAssign<Point<N>> for Point<N>
impl<N: Num> SubAssign<Point<N>> for Point<N>
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the -=
operation. Read more
sourceimpl<N: Num> SubAssign<Point<N>> for Rect<N>
impl<N: Num> SubAssign<Point<N>> for Rect<N>
sourcefn sub_assign(&mut self, other: Point<N>)
fn sub_assign(&mut self, other: Point<N>)
Performs the -=
operation. Read more
sourceimpl<N: Num> SubAssign<Size<N>> for Point<N>
impl<N: Num> SubAssign<Size<N>> for Point<N>
sourcefn sub_assign(&mut self, other: Size<N>)
fn sub_assign(&mut self, other: Size<N>)
Performs the -=
operation. Read more
sourceimpl<O: Num, N: Num + ToRounded<O>> ToRounded<Point<O>> for Point<N>
impl<O: Num, N: Num + ToRounded<O>> ToRounded<Point<O>> for Point<N>
sourcefn to_rounded(self) -> Point<O>
fn to_rounded(self) -> Point<O>
Returns the value in the new type, but clamped.
impl<N: Copy + Num> Copy for Point<N>
impl<N: Num> StructuralPartialEq for Point<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for Point<N> where
N: RefUnwindSafe,
impl<N> Send for Point<N> where
N: Send,
impl<N> Sync for Point<N> where
N: Sync,
impl<N> Unpin for Point<N> where
N: Unpin,
impl<N> UnwindSafe for Point<N> where
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more