Type Alias comfy_wgpu::spin_sleep::RatePerSecond
pub type RatePerSecond = f64;Expand description
Marker alias to show the meaning of a f64 in certain methods.
Trait Implementations§
1.22.0 · source§impl AddAssign<&f64> for f64
impl AddAssign<&f64> for f64
source§fn add_assign(&mut self, other: &f64)
fn add_assign(&mut self, other: &f64)
+= operation. Read more1.8.0 · source§impl AddAssign<f64> for f64
impl AddAssign<f64> for f64
source§fn add_assign(&mut self, other: f64)
fn add_assign(&mut self, other: f64)
+= operation. Read more§impl AsPrimitive<OrderedFloat<f32>> for f64
impl AsPrimitive<OrderedFloat<f32>> for f64
§fn as_(self) -> OrderedFloat<f32>
fn as_(self) -> OrderedFloat<f32>
as operator.§impl AsPrimitive<OrderedFloat<f64>> for f64
impl AsPrimitive<OrderedFloat<f64>> for f64
§fn as_(self) -> OrderedFloat<f64>
fn as_(self) -> OrderedFloat<f64>
as operator.source§impl AsPrimitive<f32> for f64
impl AsPrimitive<f32> for f64
source§impl AsPrimitive<f64> for f64
impl AsPrimitive<f64> for f64
source§impl AsPrimitive<i128> for f64
impl AsPrimitive<i128> for f64
source§impl AsPrimitive<i16> for f64
impl AsPrimitive<i16> for f64
source§impl AsPrimitive<i32> for f64
impl AsPrimitive<i32> for f64
source§impl AsPrimitive<i64> for f64
impl AsPrimitive<i64> for f64
source§impl AsPrimitive<i8> for f64
impl AsPrimitive<i8> for f64
source§impl AsPrimitive<isize> for f64
impl AsPrimitive<isize> for f64
source§impl AsPrimitive<u128> for f64
impl AsPrimitive<u128> for f64
source§impl AsPrimitive<u16> for f64
impl AsPrimitive<u16> for f64
source§impl AsPrimitive<u32> for f64
impl AsPrimitive<u32> for f64
source§impl AsPrimitive<u64> for f64
impl AsPrimitive<u64> for f64
source§impl AsPrimitive<u8> for f64
impl AsPrimitive<u8> for f64
source§impl AsPrimitive<usize> for f64
impl AsPrimitive<usize> for f64
1.22.0 · source§impl DivAssign<&f64> for f64
impl DivAssign<&f64> for f64
source§fn div_assign(&mut self, other: &f64)
fn div_assign(&mut self, other: &f64)
/= operation. Read more1.8.0 · source§impl DivAssign<f64> for f64
impl DivAssign<f64> for f64
source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
/= operation. Read moresource§impl Float for f64
impl Float for f64
source§fn neg_infinity() -> f64
fn neg_infinity() -> f64
source§fn min_value() -> f64
fn min_value() -> f64
source§fn min_positive_value() -> f64
fn min_positive_value() -> f64
source§fn max_value() -> f64
fn max_value() -> f64
source§fn integer_decode(self) -> (u64, i16, i8)
fn integer_decode(self) -> (u64, i16, i8)
sign * mantissa * 2 ^ exponent. Read moresource§fn is_infinite(self) -> bool
fn is_infinite(self) -> bool
true if this value is positive infinity or negative infinity and
false otherwise. Read moresource§fn classify(self) -> FpCategory
fn classify(self) -> FpCategory
source§fn ceil(self) -> f64
fn ceil(self) -> f64
source§fn round(self) -> f64
fn round(self) -> f64
0.0. Read moresource§fn is_sign_positive(self) -> bool
fn is_sign_positive(self) -> bool
source§fn is_sign_negative(self) -> bool
fn is_sign_negative(self) -> bool
true if self is negative, including -0.0,
Float::neg_infinity(), and -Float::nan(). Read moresource§fn mul_add(self, a: f64, b: f64) -> f64
fn mul_add(self, a: f64, b: f64) -> f64
(self * a) + b with only one rounding
error, yielding a more accurate result than an unfused multiply-add. Read moresource§fn log(self, base: f64) -> f64
fn log(self, base: f64) -> f64
source§fn to_degrees(self) -> f64
fn to_degrees(self) -> f64
source§fn to_radians(self) -> f64
fn to_radians(self) -> f64
source§fn hypot(self, other: f64) -> f64
fn hypot(self, other: f64) -> f64
x and y. Read moresource§fn asin(self) -> f64
fn asin(self) -> f64
source§fn acos(self) -> f64
fn acos(self) -> f64
source§fn atan(self) -> f64
fn atan(self) -> f64
source§fn exp_m1(self) -> f64
fn exp_m1(self) -> f64
e^(self) - 1 in a way that is accurate even if the
number is close to zero. Read moresource§fn ln_1p(self) -> f64
fn ln_1p(self) -> f64
ln(1+n) (natural logarithm) more accurately than if
the operations were performed separately. Read moresource§impl FloatConst for f64
impl FloatConst for f64
source§fn FRAC_1_SQRT_2() -> f64
fn FRAC_1_SQRT_2() -> f64
1.0 / sqrt(2.0).source§fn FRAC_2_SQRT_PI() -> f64
fn FRAC_2_SQRT_PI() -> f64
2.0 / sqrt(π).source§impl FloatCore for f64
impl FloatCore for f64
source§fn neg_infinity() -> f64
fn neg_infinity() -> f64
source§fn min_value() -> f64
fn min_value() -> f64
source§fn min_positive_value() -> f64
fn min_positive_value() -> f64
source§fn max_value() -> f64
fn max_value() -> f64
source§fn integer_decode(self) -> (u64, i16, i8)
fn integer_decode(self) -> (u64, i16, i8)
sign * mantissa * 2 ^ exponent. Read moresource§fn is_infinite(self) -> bool
fn is_infinite(self) -> bool
true if the number is infinite. Read moresource§fn is_normal(self) -> bool
fn is_normal(self) -> bool
true if the number is neither zero, infinite, subnormal or NaN. Read moresource§fn classify(self) -> FpCategory
fn classify(self) -> FpCategory
source§fn is_sign_positive(self) -> bool
fn is_sign_positive(self) -> bool
true if self is positive, including +0.0 and
FloatCore::infinity(), and FloatCore::nan(). Read moresource§fn is_sign_negative(self) -> bool
fn is_sign_negative(self) -> bool
true if self is negative, including -0.0 and
FloatCore::neg_infinity(), and -FloatCore::nan(). Read moresource§fn recip(self) -> f64
fn recip(self) -> f64
source§fn to_degrees(self) -> f64
fn to_degrees(self) -> f64
source§fn to_radians(self) -> f64
fn to_radians(self) -> f64
source§fn ceil(self) -> f64
fn ceil(self) -> f64
source§fn round(self) -> f64
fn round(self) -> f64
0.0. Read more§impl FloatOrd for f64
impl FloatOrd for f64
§fn ord(self) -> OrderedFloat<f64>
fn ord(self) -> OrderedFloat<f64>
§impl From<OrderedFloat<f64>> for f64
impl From<OrderedFloat<f64>> for f64
§fn from(f: OrderedFloat<f64>) -> f64
fn from(f: OrderedFloat<f64>) -> f64
source§impl FromBytes for f64
impl FromBytes for f64
type Bytes = [u8; 8]
source§fn from_be_bytes(bytes: &<f64 as FromBytes>::Bytes) -> f64
fn from_be_bytes(bytes: &<f64 as FromBytes>::Bytes) -> f64
source§impl FromPrimitive for f64
impl FromPrimitive for f64
source§fn from_isize(n: isize) -> Option<f64>
fn from_isize(n: isize) -> Option<f64>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_i8(n: i8) -> Option<f64>
fn from_i8(n: i8) -> Option<f64>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_i16(n: i16) -> Option<f64>
fn from_i16(n: i16) -> Option<f64>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_i32(n: i32) -> Option<f64>
fn from_i32(n: i32) -> Option<f64>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_i64(n: i64) -> Option<f64>
fn from_i64(n: i64) -> Option<f64>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_i128(n: i128) -> Option<f64>
fn from_i128(n: i128) -> Option<f64>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresource§fn from_usize(n: usize) -> Option<f64>
fn from_usize(n: usize) -> Option<f64>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_u8(n: u8) -> Option<f64>
fn from_u8(n: u8) -> Option<f64>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_u16(n: u16) -> Option<f64>
fn from_u16(n: u16) -> Option<f64>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_u32(n: u32) -> Option<f64>
fn from_u32(n: u32) -> Option<f64>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_u64(n: u64) -> Option<f64>
fn from_u64(n: u64) -> Option<f64>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.source§fn from_u128(n: u128) -> Option<f64>
fn from_u128(n: u128) -> Option<f64>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more1.0.0 · source§impl FromStr for f64
impl FromStr for f64
source§fn from_str(src: &str) -> Result<f64, ParseFloatError>
fn from_str(src: &str) -> Result<f64, ParseFloatError>
Converts a string in base 10 to a float. Accepts an optional decimal exponent.
This function accepts strings such as
- ‘3.14’
- ‘-3.14’
- ‘2.5E10’, or equivalently, ‘2.5e10’
- ‘2.5E-10’
- ‘5.’
- ‘.5’, or, equivalently, ‘0.5’
- ‘inf’, ‘-inf’, ‘+infinity’, ‘NaN’
Note that alphabetical characters are not case-sensitive.
Leading and trailing whitespace represent an error.
Grammar
All strings that adhere to the following EBNF grammar when
lowercased will result in an Ok being returned:
Float ::= Sign? ( 'inf' | 'infinity' | 'nan' | Number )
Number ::= ( Digit+ |
Digit+ '.' Digit* |
Digit* '.' Digit+ ) Exp?
Exp ::= 'e' Sign? Digit+
Sign ::= [+-]
Digit ::= [0-9]
Arguments
- src - A string
Return value
Err(ParseFloatError) if the string did not represent a valid
number. Otherwise, Ok(n) where n is the closest
representable floating-point number to the number represented
by src (following the same rules for rounding as for the
results of primitive operations).
§type Err = ParseFloatError
type Err = ParseFloatError
source§impl MulAddAssign<f64, f64> for f64
impl MulAddAssign<f64, f64> for f64
source§fn mul_add_assign(&mut self, a: f64, b: f64)
fn mul_add_assign(&mut self, a: f64, b: f64)
*self = (*self * a) + b1.22.0 · source§impl MulAssign<&f64> for f64
impl MulAssign<&f64> for f64
source§fn mul_assign(&mut self, other: &f64)
fn mul_assign(&mut self, other: &f64)
*= operation. Read more1.8.0 · source§impl MulAssign<f64> for f64
impl MulAssign<f64> for f64
source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
*= operation. Read moresource§impl Num for f64
impl Num for f64
type FromStrRadixErr = ParseFloatError
1.0.0 · source§impl PartialOrd<f64> for f64
impl PartialOrd<f64> for f64
source§fn le(&self, other: &f64) -> bool
fn le(&self, other: &f64) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Primitive for f64
impl Primitive for f64
source§const DEFAULT_MAX_VALUE: f64 = 1f64
const DEFAULT_MAX_VALUE: f64 = 1f64
1.0, whereas the integer types inherit their usual maximum values.source§const DEFAULT_MIN_VALUE: f64 = 0f64
const DEFAULT_MIN_VALUE: f64 = 0f64
0.0, whereas the integer types inherit their usual minimum values.1.0.0 · source§impl Rem<f64> for f64
impl Rem<f64> for f64
The remainder from the division of two floats.
The remainder has the same sign as the dividend and is computed as:
x - (x / y).trunc() * y.
Examples
let x: f32 = 50.50;
let y: f32 = 8.125;
let remainder = x - (x / y).trunc() * y;
// The answer to both operations is 1.75
assert_eq!(x % y, remainder);1.22.0 · source§impl RemAssign<&f64> for f64
impl RemAssign<&f64> for f64
source§fn rem_assign(&mut self, other: &f64)
fn rem_assign(&mut self, other: &f64)
%= operation. Read more1.8.0 · source§impl RemAssign<f64> for f64
impl RemAssign<f64> for f64
source§fn rem_assign(&mut self, other: f64)
fn rem_assign(&mut self, other: f64)
%= operation. Read moresource§impl SampleUniform for f64
impl SampleUniform for f64
§type Sampler = UniformFloat<f64>
type Sampler = UniformFloat<f64>
UniformSampler implementation supporting type X.§impl SerJson for f64
impl SerJson for f64
§fn ser_json(&self, _d: usize, s: &mut SerJsonState)
fn ser_json(&self, _d: usize, s: &mut SerJsonState)
§fn serialize_json(&self) -> String
fn serialize_json(&self) -> String
§impl SerRon for f64
impl SerRon for f64
§fn ser_ron(&self, _d: usize, s: &mut SerRonState)
fn ser_ron(&self, _d: usize, s: &mut SerRonState)
§fn serialize_ron(&self) -> String
fn serialize_ron(&self) -> String
source§impl Signed for f64
impl Signed for f64
source§fn abs_sub(&self, other: &f64) -> f64
fn abs_sub(&self, other: &f64) -> f64
The positive difference of two numbers. Returns 0.0 if the number is
less than or equal to other, otherwise the difference betweenself
and other is returned.
source§fn signum(&self) -> f64
fn signum(&self) -> f64
Returns
1.0if the number is positive,+0.0orINFINITY-1.0if the number is negative,-0.0orNEG_INFINITYNANif the number is NaN
source§fn is_positive(&self) -> bool
fn is_positive(&self) -> bool
Returns true if the number is positive, including +0.0 and INFINITY
source§fn is_negative(&self) -> bool
fn is_negative(&self) -> bool
Returns true if the number is negative, including -0.0 and NEG_INFINITY
source§impl SimdElement for f64
impl SimdElement for f64
1.22.0 · source§impl SubAssign<&f64> for f64
impl SubAssign<&f64> for f64
source§fn sub_assign(&mut self, other: &f64)
fn sub_assign(&mut self, other: &f64)
-= operation. Read more1.8.0 · source§impl SubAssign<f64> for f64
impl SubAssign<f64> for f64
source§fn sub_assign(&mut self, other: f64)
fn sub_assign(&mut self, other: f64)
-= operation. Read moresource§impl ToBytes for f64
impl ToBytes for f64
type Bytes = [u8; 8]
source§fn to_be_bytes(&self) -> <f64 as ToBytes>::Bytes
fn to_be_bytes(&self) -> <f64 as ToBytes>::Bytes
source§impl ToPrimitive for f64
impl ToPrimitive for f64
source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
self to an isize. If the value cannot be
represented by an isize, then None is returned.source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
self to an i8. If the value cannot be
represented by an i8, then None is returned.source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
self to an i16. If the value cannot be
represented by an i16, then None is returned.source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
self to an i32. If the value cannot be
represented by an i32, then None is returned.source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
self to an i64. If the value cannot be
represented by an i64, then None is returned.source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
self to an i128. If the value cannot be
represented by an i128 (i64 under the default implementation), then
None is returned. Read moresource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
self to a usize. If the value cannot be
represented by a usize, then None is returned.source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
self to a u8. If the value cannot be
represented by a u8, then None is returned.source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
self to a u16. If the value cannot be
represented by a u16, then None is returned.source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
self to a u32. If the value cannot be
represented by a u32, then None is returned.source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
self to a u64. If the value cannot be
represented by a u64, then None is returned.source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
self to a u128. If the value cannot be
represented by a u128 (u64 under the default implementation), then
None is returned. Read more