Struct etterna::Wifescore [−][src]
Wifescore struct. Guaranteed to be a valid value, i.e. <= 100% and not NaN (may be negative infinity though)
Implementations
impl Wifescore
[src]
pub const D_THRESHOLD: Self
[src]
pub const C_THRESHOLD: Self
[src]
pub const B_THRESHOLD: Self
[src]
pub const A_THRESHOLD: Self
[src]
pub const AA_THRESHOLD: Self
[src]
pub const AAA_THRESHOLD: Self
[src]
pub const AAAA_THRESHOLD: Self
[src]
pub const AAAAA_THRESHOLD: Self
[src]
pub fn from_percent(percent: f32) -> Option<Self>
[src]
Makes a Wifescore from a value, assumed to be scaled to a max of 100
Returns None if the percentage is over 100%, or if it is infinite or NaN
pub fn from_proportion(proportion: f32) -> Option<Self>
[src]
Makes a Wifescore from a value, assumed to be scaled to a max of 1
Returns None if the proportion is over 1.0 (100%), or if it is infinite or NaN
pub fn as_percent(self) -> f32
[src]
Returns the wifescore, scaled to a max of 100
pub fn as_proportion(self) -> f32
[src]
Returns the wifescore, scaled to a max of 1
Trait Implementations
impl Clone for Wifescore
[src]
impl Copy for Wifescore
[src]
impl Debug for Wifescore
[src]
impl Default for Wifescore
[src]
impl Display for Wifescore
[src]
impl Eq for Wifescore
[src]
impl Ord for Wifescore
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Wifescore> for Wifescore
[src]
impl PartialOrd<Wifescore> for Wifescore
[src]
fn partial_cmp(&self, other: &Wifescore) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for Wifescore
[src]
Auto Trait Implementations
impl RefUnwindSafe for Wifescore
impl Send for Wifescore
impl Sync for Wifescore
impl Unpin for Wifescore
impl UnwindSafe for Wifescore
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,