Struct euclid::size::Size2D
[−]
[src]
pub struct Size2D<T> { pub width: T, pub height: T, }
Fields
width | |
height |
Methods
impl<T: Clone> Size2D<T>
impl<T: Copy + Clone + Mul<T, Output=U>, U> Size2D<T>
fn area(&self) -> U
impl<T: Zero> Size2D<T>
impl<Unit, T: Clone> Size2D<Length<Unit, T>>
fn typed(width: T, height: T) -> TypedSize2D<Unit, T>
fn to_untyped(&self) -> Size2D<T>
Drop the units, preserving only the numeric value.
fn from_untyped(p: &Size2D<T>) -> TypedSize2D<Unit, T>
Tag a unitless value with units.
impl<Unit, T0: NumCast + Clone> Size2D<Length<Unit, T0>>
fn cast<T1: NumCast + Clone>(&self) -> Option<Size2D<Length<Unit, T1>>>
Cast from one numeric representation to another, preserving the units.