[−][src]Struct math2d::Point2i
Mathematical point on the 2D (x, y) plane.
Fields
x: i32
Horizontal component
y: i32
Vertical component
Methods
impl Point2i
[src]
pub const ORIGIN: Point2i
[src]
Mathematical origin point
pub fn new(x: i32, y: i32) -> Point2i
[src]
Construct a point from its components
pub fn to_f32(self) -> Point2f
[src]
Convert this value to a floating point
pub fn to_u32(self) -> Point2u
[src]
Convert this value to an unsigned point. It is the caller's duty to ensure the values are not negative to avoid casting underflow.
Trait Implementations
impl PartialOrd<Point2i> for Point2i
[src]
fn partial_cmp(&self, other: &Point2i) -> Option<Ordering>
[src]
fn lt(&self, other: &Point2i) -> bool
[src]
fn le(&self, other: &Point2i) -> bool
[src]
fn gt(&self, other: &Point2i) -> bool
[src]
fn ge(&self, other: &Point2i) -> bool
[src]
impl Copy for Point2i
[src]
impl PartialEq<Point2i> for Point2i
[src]
impl Default for Point2i
[src]
impl From<(i32, i32)> for Point2i
[src]
impl From<Point2i> for (i32, i32)
[src]
impl From<Point2i> for D2D_POINT_2L
[src]
fn from(point: Point2i) -> D2D_POINT_2L
[src]
impl From<POINT> for Point2i
[src]
fn from(point: D2D_POINT_2L) -> Point2i
[src]
impl From<Point2i> for Point2<i32>
[src]
impl From<Point2<i32>> for Point2i
[src]
impl From<Point2i> for Recti
[src]
impl Clone for Point2i
[src]
fn clone(&self) -> Point2i
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Point2i
[src]
fn cmp(&self, other: &Point2i) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Eq for Point2i
[src]
impl Debug for Point2i
[src]
impl<V> Add<V> for Point2i where
V: Into<Vector2i>,
[src]
V: Into<Vector2i>,
type Output = Point2i
The resulting type after applying the +
operator.
fn add(self, rhs: V) -> Point2i
[src]
impl Add<Point2i> for Vector2i
[src]
type Output = Point2i
The resulting type after applying the +
operator.
fn add(self, rhs: Point2i) -> Point2i
[src]
impl Sub<Point2i> for Point2i
[src]
type Output = Vector2i
The resulting type after applying the -
operator.
fn sub(self, rhs: Point2i) -> Vector2i
[src]
impl Sub<(i32, i32)> for Point2i
[src]
type Output = Vector2i
The resulting type after applying the -
operator.
fn sub(self, rhs: (i32, i32)) -> Vector2i
[src]
impl<V> Sub<V> for Point2i where
V: Into<Vector2i>,
[src]
V: Into<Vector2i>,
type Output = Point2i
The resulting type after applying the -
operator.
fn sub(self, rhs: V) -> Point2i
[src]
impl<V> AddAssign<V> for Point2i where
Point2i: Add<V, Output = Point2i>,
[src]
Point2i: Add<V, Output = Point2i>,
fn add_assign(&mut self, v: V)
[src]
impl<V> SubAssign<V> for Point2i where
Point2i: Sub<V, Output = Point2i>,
[src]
Point2i: Sub<V, Output = Point2i>,
fn sub_assign(&mut self, v: V)
[src]
impl Hash for Point2i
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Serialize for Point2i
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Point2i
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,