[−][src]Struct tge::math::Size
Fields
width: N
height: 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]
physical_size: impl Into<PhysicalSize>,
scale_factor: f32
) -> Self
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]
logical_size: impl Into<LogicalSize>,
scale_factor: f32
) -> Self
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.
fn div(self, value: N) -> Self::Output
[src]
impl<N: Number> Div<Vector<N>> for Size<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, vec: Vector<N>) -> Self::Output
[src]
impl<N: Number> DivAssign<N> for Size<N>
[src]
fn div_assign(&mut self, value: N)
[src]
impl<N: Number> DivAssign<Vector<N>> for Size<N>
[src]
fn div_assign(&mut self, vec: Vector<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.
fn mul(self, value: N) -> Self::Output
[src]
impl<N: Number> Mul<Vector<N>> for Size<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, vec: Vector<N>) -> Self::Output
[src]
impl<N: Number> MulAssign<N> for Size<N>
[src]
fn mul_assign(&mut self, value: N)
[src]
impl<N: Number> MulAssign<Vector<N>> for Size<N>
[src]
fn mul_assign(&mut self, vec: Vector<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,
N: RefUnwindSafe,
impl<N> Send for Size<N> where
N: Send,
N: Send,
impl<N> Sync for Size<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Size<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Size<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,