[][src]Struct tge::math::Size

pub struct Size<N: Number = f32> {
    pub width: N,
    pub height: N,
}

Fields

width: Nheight: N

Implementations

impl<N: Number> Size<N>[src]

pub fn new(width: N, height: N) -> Self[src]

pub fn zero() -> Self[src]

pub fn none() -> Option<Self>[src]

impl Size<f32>[src]

pub fn from_physical(
    physical_size: impl Into<PhysicalSize>,
    scale_factor: f32
) -> Self
[src]

pub fn to_physical(&self, scale_factor: f32) -> PhysicalSize[src]

impl Size<u32>[src]

pub fn from_logical(
    logical_size: impl Into<LogicalSize>,
    scale_factor: f32
) -> Self
[src]

pub fn to_logical(&self, scale_factor: f32) -> LogicalSize[src]

Trait Implementations

impl<N: Clone + Number> Clone for Size<N>[src]

impl<N: Copy + Number> Copy for Size<N>[src]

impl<N: Debug + Number> Debug for Size<N>[src]

impl<N: Number> Div<N> for Size<N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<N: Number> Div<Vector<N>> for Size<N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<N: Number> DivAssign<N> for Size<N>[src]

impl<N: Number> DivAssign<Vector<N>> for Size<N>[src]

impl<N: Number> From<(N, N)> for Size<N>[src]

impl<N: Number> Into<(N, N)> for Size<N>[src]

impl<N: Number> Mul<N> for Size<N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<N: Number> Mul<Vector<N>> for Size<N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<N: Number> MulAssign<N> for Size<N>[src]

impl<N: Number> MulAssign<Vector<N>> for Size<N>[src]

impl<N: PartialEq + Number> PartialEq<Size<N>> for Size<N>[src]

impl<N: Number> StructuralPartialEq for Size<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for Size<N> where
    N: RefUnwindSafe

impl<N> Send for Size<N> where
    N: Send

impl<N> Sync for Size<N> where
    N: Sync

impl<N> Unpin for Size<N> where
    N: Unpin

impl<N> UnwindSafe for Size<N> where
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.