pub type Delta<T> = Vec2<T>;
Expand description
A type alias that semantically expresses an offset/delta.
Aliased Type§
struct Delta<T> {
pub x: T,
pub y: T,
}
Fields§
§x: T
§y: T
Implementations
Source§impl<T> Vec2<T>
impl<T> Vec2<T>
Sourcepub fn random_cardinal_with(rng: &mut impl Rng) -> Self
pub fn random_cardinal_with(rng: &mut impl Rng) -> Self
Randomly one of the four cardinal rotations with the given rng.
Sourcepub fn random_cardinal() -> Self
pub fn random_cardinal() -> Self
Randomly one of the four cardinal rotations with the thread-local rng.
Trait Implementations
Source§impl<T> AddAssign for Vec2<T>where
T: AddAssign<T>,
impl<T> AddAssign for Vec2<T>where
T: AddAssign<T>,
Source§fn add_assign(&mut self, rhs: Vec2<T>)
fn add_assign(&mut self, rhs: Vec2<T>)
Performs the
+=
operation. Read moreSource§impl<'de, T> Deserialize<'de> for Vec2<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Vec2<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> SubAssign for Vec2<T>where
T: SubAssign<T>,
impl<T> SubAssign for Vec2<T>where
T: SubAssign<T>,
Source§fn sub_assign(&mut self, rhs: Vec2<T>)
fn sub_assign(&mut self, rhs: Vec2<T>)
Performs the
-=
operation. Read more