pub struct Point<N: Num = f32>(pub N, pub 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)
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>()
pub fn sign(&self) -> Self
pub fn overlaps(self, Point: Self, xy1: Self, xy2: Self) -> bool
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn round(self) -> Self
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
fn add(self, other: Size<N>) -> Self
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the /
operator.
fn div(self, other: N) -> Self
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
The resulting type after applying the /
operator.
fn div(self, other: Size<N>) -> Self
fn from((x, y): (N, N)) -> Self
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
The resulting type after applying the *
operator.
fn mul(self, other: N) -> Self
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
The resulting type after applying the *
operator.
fn mul(self, other: Size<N>) -> Self
The resulting type after applying the -
operator.
fn new(x: N, y: N) -> Self
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
The resulting type after applying the <<
operator.
fn shl(self, other: N) -> Self
The resulting type after applying the >>
operator.
fn shr(self, other: N) -> Self
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
fn sub(self, other: Size<N>) -> Self
Returns the value in the new type, but clamped.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
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>,