Struct oxygengine_composite_renderer::math::Vec2 [−][src]
Fields
x: Scalar
y: Scalar
Implementations
impl Vec2
[src]
pub fn new(x: Scalar, y: Scalar) -> Self
[src]
pub fn zero() -> Self
[src]
pub fn one() -> Self
[src]
pub fn sqr_magnitude(self) -> Scalar
[src]
pub fn magnitude(self) -> Scalar
[src]
pub fn normalized(self) -> Self
[src]
pub fn dot(self, other: Self) -> Scalar
[src]
pub fn right(self) -> Vec2
[src]
pub fn is_clockwise(a: Self, b: Self) -> bool
[src]
pub fn lerp(self, other: Vec2, factor: Scalar) -> Self
[src]
pub fn lerp_clamped(self, other: Vec2, factor: Scalar) -> Self
[src]
pub fn project_distance(self, from: Vec2, to: Vec2) -> Scalar
[src]
pub fn project(self, from: Vec2, to: Vec2) -> Vec2
[src]
Trait Implementations
impl Add<Vec2> for Vec2
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Add<f32> for Vec2
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Scalar) -> Self
[src]
impl Clone for Vec2
[src]
impl Copy for Vec2
[src]
impl Debug for Vec2
[src]
impl Default for Vec2
[src]
impl<'de> Deserialize<'de> for Vec2
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Div<Vec2> for Vec2
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl Div<f32> for Vec2
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Scalar) -> Self
[src]
impl From<[f32; 2]> for Vec2
[src]
impl From<(f32, f32)> for Vec2
[src]
impl From<f32> for Vec2
[src]
impl Mul<Mat2d> for Vec2
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Mat2d) -> Self
[src]
impl Mul<Vec2> for Mat2d
[src]
type Output = Vec2
The resulting type after applying the *
operator.
fn mul(self, other: Vec2) -> Vec2
[src]
impl Mul<Vec2> for Vec2
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl Mul<f32> for Vec2
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Scalar) -> Self
[src]
impl Neg for Vec2
[src]
impl PartialEq<Vec2> for Vec2
[src]
impl Serialize for Vec2
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Vec2
[src]
impl Sub<Vec2> for Vec2
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl Sub<f32> for Vec2
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec2
impl Send for Vec2
impl Sync for Vec2
impl Unpin for Vec2
impl UnwindSafe for Vec2
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
pub fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Resource for T where
T: Any,
T: Any,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> TryDefault for T where
T: Default,
T: Default,
pub fn try_default() -> Result<T, String>
pub fn unwrap_default() -> Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,