Struct Vector2i

Source
#[repr(C)]
pub struct Vector2i { pub x: i32, pub y: i32, }

Fields§

§x: i32§y: i32

Implementations§

Source§

impl Vector2i

Source

pub fn new(x: i32, y: i32) -> Self

Source

pub fn zero() -> Self

Source

pub fn to_vector2(&self) -> Vector2

Trait Implementations§

Source§

impl Add<Vector2> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vector2) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Vector2i> for Vector2

Source§

type Output = Vector2

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vector2i) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Vector2i> for f32

Source§

type Output = Vector2i

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vector2i) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Vector2i> for i32

Source§

type Output = Vector2i

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vector2i) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<f32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<i32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vector2i) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<Vector2> for Vector2i

Source§

fn add_assign(&mut self, rhs: Vector2)

Performs the += operation. Read more
Source§

impl AddAssign<Vector2i> for Vector2

Source§

fn add_assign(&mut self, rhs: Vector2i)

Performs the += operation. Read more
Source§

impl AddAssign<f32> for Vector2i

Source§

fn add_assign(&mut self, rhs: f32)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for Vector2i

Source§

fn add_assign(&mut self, rhs: i32)

Performs the += operation. Read more
Source§

impl AddAssign for Vector2i

Source§

fn add_assign(&mut self, rhs: Vector2i)

Performs the += operation. Read more
Source§

impl Clone for Vector2i

Source§

fn clone(&self) -> Vector2i

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Vector2i

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Vector2i

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<Vector2> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vector2) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Vector2i> for Vector2

Source§

type Output = Vector2

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vector2i) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Vector2i> for f32

Source§

type Output = Vector2i

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vector2i) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Vector2i> for i32

Source§

type Output = Vector2i

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vector2i) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<f32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<i32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vector2i) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<Vector2> for Vector2i

Source§

fn div_assign(&mut self, rhs: Vector2)

Performs the /= operation. Read more
Source§

impl DivAssign<Vector2i> for Vector2

Source§

fn div_assign(&mut self, rhs: Vector2i)

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for Vector2i

Source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
Source§

impl DivAssign<i32> for Vector2i

Source§

fn div_assign(&mut self, rhs: i32)

Performs the /= operation. Read more
Source§

impl DivAssign for Vector2i

Source§

fn div_assign(&mut self, rhs: Vector2i)

Performs the /= operation. Read more
Source§

impl From<&Vector2> for Vector2i

Source§

fn from(value: &Vector2) -> Self

Converts to this type from the input type.
Source§

impl From<&Vector2i> for Vector2

Source§

fn from(value: &Vector2i) -> Self

Converts to this type from the input type.
Source§

impl From<Vector2> for Vector2i

Source§

fn from(value: Vector2) -> Self

Converts to this type from the input type.
Source§

impl From<Vector2i> for Vector2

Source§

fn from(value: Vector2i) -> Self

Converts to this type from the input type.
Source§

impl Mul<Vector2> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector2) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vector2i> for Vector2

Source§

type Output = Vector2

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector2i) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vector2i> for f32

Source§

type Output = Vector2i

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector2i) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vector2i> for i32

Source§

type Output = Vector2i

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector2i) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<i32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector2i) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<Vector2> for Vector2i

Source§

fn mul_assign(&mut self, rhs: Vector2)

Performs the *= operation. Read more
Source§

impl MulAssign<Vector2i> for Vector2

Source§

fn mul_assign(&mut self, rhs: Vector2i)

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for Vector2i

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for Vector2i

Source§

fn mul_assign(&mut self, rhs: i32)

Performs the *= operation. Read more
Source§

impl MulAssign for Vector2i

Source§

fn mul_assign(&mut self, rhs: Vector2i)

Performs the *= operation. Read more
Source§

impl Sub<Vector2> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vector2) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Vector2i> for Vector2

Source§

type Output = Vector2

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vector2i) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Vector2i> for f32

Source§

type Output = Vector2i

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vector2i) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Vector2i> for i32

Source§

type Output = Vector2i

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vector2i) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<f32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<i32> for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Vector2i

Source§

type Output = Vector2i

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vector2i) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<Vector2> for Vector2i

Source§

fn sub_assign(&mut self, rhs: Vector2)

Performs the -= operation. Read more
Source§

impl SubAssign<Vector2i> for Vector2

Source§

fn sub_assign(&mut self, rhs: Vector2i)

Performs the -= operation. Read more
Source§

impl SubAssign<f32> for Vector2i

Source§

fn sub_assign(&mut self, rhs: f32)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for Vector2i

Source§

fn sub_assign(&mut self, rhs: i32)

Performs the -= operation. Read more
Source§

impl SubAssign for Vector2i

Source§

fn sub_assign(&mut self, rhs: Vector2i)

Performs the -= operation. Read more
Source§

impl Copy for Vector2i

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.