[−][src]Struct bevy::prelude::Scale
Implementations
impl Scale
[src]
Methods from Deref<Target = f32>
pub const RADIX: u32
1.43.0[src]
pub const MANTISSA_DIGITS: u32
1.43.0[src]
pub const DIGITS: u32
1.43.0[src]
pub const EPSILON: f32
1.43.0[src]
pub const MIN: f32
1.43.0[src]
pub const MIN_POSITIVE: f32
1.43.0[src]
pub const MAX: f32
1.43.0[src]
pub const MIN_EXP: i32
1.43.0[src]
pub const MAX_EXP: i32
1.43.0[src]
pub const MIN_10_EXP: i32
1.43.0[src]
pub const MAX_10_EXP: i32
1.43.0[src]
pub const NAN: f32
1.43.0[src]
pub const INFINITY: f32
1.43.0[src]
pub const NEG_INFINITY: f32
1.43.0[src]
pub fn total_cmp(&self, other: &f32) -> Ordering
[src]
🔬 This is a nightly-only experimental API. (
total_cmp
)Returns an ordering between self and other values. Unlike the standard partial comparison between floating point numbers, this comparison always produces an ordering in accordance to the totalOrder predicate as defined in IEEE 754 (2008 revision) floating point standard. The values are ordered in following order:
- Negative quiet NaN
- Negative signaling NaN
- Negative infinity
- Negative numbers
- Negative subnormal numbers
- Negative zero
- Positive zero
- Positive subnormal numbers
- Positive numbers
- Positive infinity
- Positive signaling NaN
- Positive quiet NaN
Example
#![feature(total_cmp)] struct GoodBoy { name: String, weight: f32, } let mut bois = vec![ GoodBoy { name: "Pucci".to_owned(), weight: 0.1 }, GoodBoy { name: "Woofer".to_owned(), weight: 99.0 }, GoodBoy { name: "Yapper".to_owned(), weight: 10.0 }, GoodBoy { name: "Chonk".to_owned(), weight: f32::INFINITY }, GoodBoy { name: "Abs. Unit".to_owned(), weight: f32::NAN }, GoodBoy { name: "Floaty".to_owned(), weight: -5.0 }, ]; bois.sort_by(|a, b| a.weight.total_cmp(&b.weight));
Trait Implementations
impl Clone for Scale
[src]
impl Copy for Scale
[src]
impl Debug for Scale
[src]
impl Default for Scale
[src]
impl Deref for Scale
[src]
type Target = f32
The resulting type after dereferencing.
fn deref(&self) -> &<Scale as Deref>::Target
[src]
impl DerefMut for Scale
[src]
impl DeserializeProperty for Scale
[src]
fn deserialize(
deserializer: &mut dyn Deserializer,
property_type_registry: &PropertyTypeRegistry
) -> Result<Box<dyn Property + 'static>, Error>
[src]
deserializer: &mut dyn Deserializer,
property_type_registry: &PropertyTypeRegistry
) -> Result<Box<dyn Property + 'static>, Error>
impl Display for Scale
[src]
impl From<f32> for Scale
[src]
impl PartialEq<Scale> for Scale
[src]
impl Properties for Scale
[src]
fn prop(&self, name: &str) -> Option<&(dyn Property + 'static)>
[src]
fn prop_mut(&mut self, name: &str) -> Option<&mut (dyn Property + 'static)>
[src]
fn prop_with_index(&self, index: usize) -> Option<&(dyn Property + 'static)>
[src]
fn prop_with_index_mut(
&mut self,
index: usize
) -> Option<&mut (dyn Property + 'static)>
[src]
&mut self,
index: usize
) -> Option<&mut (dyn Property + 'static)>
fn prop_name(&self, index: usize) -> Option<&str>
[src]
fn prop_len(&self) -> usize
[src]
fn iter_props(&self) -> PropertyIter
[src]
fn set_prop(&mut self, name: &str, value: &(dyn Property + 'static))
[src]
fn to_dynamic(&self) -> DynamicProperties
[src]
impl Property for Scale
[src]
fn type_name(&self) -> &str
[src]
fn any(&self) -> &(dyn Any + 'static)
[src]
fn any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
fn clone_prop(&self) -> Box<dyn Property + 'static>
[src]
fn set(&mut self, value: &(dyn Property + 'static))
[src]
fn apply(&mut self, value: &(dyn Property + 'static))
[src]
fn as_properties(&self) -> Option<&(dyn Properties + 'static)>
[src]
fn serializable(
&'a self,
registry: &'a PropertyTypeRegistry
) -> Serializable<'a>
[src]
&'a self,
registry: &'a PropertyTypeRegistry
) -> Serializable<'a>
fn property_type(&self) -> PropertyType
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnwindSafe for Scale
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,
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> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> FromResources for T where
T: Default,
[src]
T: Default,
fn from_resources(_resources: &Resources) -> T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P> PropertiesVal for P where
P: Properties,
[src]
P: Properties,
fn prop_val<T>(&self, name: &str) -> Option<&T> where
T: 'static,
[src]
T: 'static,
fn set_prop_val<T>(&mut self, name: &str, value: T) where
T: 'static,
[src]
T: 'static,
impl<T> Resource for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,