Struct base::world::HeightType
[−]
[src]
pub struct HeightType(pub u16);
Represents a discretized height.
Methods
impl HeightType
[src]
fn from_units(n: u16) -> Self
Creates a HeightType
with a given discrete height.
fn units(&self) -> u16
Gets the number of discrete units.
fn to_real(&self) -> f32
Calculates the real (world position) height from the underlying representation.
fn from_real(number: f32) -> f32
Trait Implementations
impl Default for HeightType
[src]
fn default() -> HeightType
Returns the "default value" for a type. Read more
impl Ord for HeightType
[src]
fn cmp(&self, __arg_0: &HeightType) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for HeightType
[src]
fn partial_cmp(&self, __arg_0: &HeightType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &HeightType) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &HeightType) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &HeightType) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &HeightType) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for HeightType
[src]
impl PartialEq for HeightType
[src]
fn eq(&self, __arg_0: &HeightType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &HeightType) -> bool
This method tests for !=
.
impl Copy for HeightType
[src]
impl Clone for HeightType
[src]
fn clone(&self) -> HeightType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more