Skip to main content

FloatOp

Enum FloatOp 

Source
#[non_exhaustive]
pub enum FloatOp {
Show 32 variants Const32(f32), Const64(f64), Add, Sub, Mul, Pow, Eq, Lt, Lte, Sqrt, Abs, Ceil, Floor, IsNan, IsInf, Exp, Log, Sin, Cos, Tan, Asin, Acos, Atan, Atan2, Sinh, Cosh, Tanh, Asinh, Acosh, Atanh, Max, Min,
}
Expand description

An operation over floating point numbers.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Const32(f32)

Create a constant 32 bit float.

§

Const64(f64)

Create a constant 64 bit float.

§

Add

Add two floats.

§

Sub

Subtract two floats.

§

Mul

Multiply two floats.

§

Pow

Calculate one float raised to the power of another.

§

Eq

Test two floats for equality.

§

Lt

Check if one float is strictly less than another.

§

Lte

Check if one float is less than or equal to another.

§

Sqrt

Calculate the square root of a float.

§

Abs

Calculate the absolute value of a float.

§

Ceil

Round a float up to the nearest integer.

§

Floor

Round a float down to the nearest integer.

§

IsNan

Check if a float is NaN.

§

IsInf

Check if a float is infinite.

§

Exp

Calculate e raised to the power of a float.

§

Log

Calculate the natural logarithm of a float.

§

Sin

Calculate the sine of a float.

§

Cos

Calculate the cosine of a float.

§

Tan

Calculate the tangent of a float.

§

Asin

Calculate the arcsine of a float.

§

Acos

Calculate the arccosine of a float.

§

Atan

Calculate the arctangent of a float.

§

Atan2

Calculate the 2-argument arctangent.

§

Sinh

Calculate the hyperbolic sine of a float.

§

Cosh

Calculate the hyperbolic cosine of a float.

§

Tanh

Calculate the hyperbolic tangent of a float.

§

Asinh

Calculate the inverse hyperbolic sine of a float.

§

Acosh

Calculate the inverse hyperbolic cosine of a float.

§

Atanh

Calculate the inverse hyperbolic tangent of a float.

§

Max

Maximum of two floats.

§

Min

Minimum of two floats.

Trait Implementations§

Source§

impl Clone for FloatOp

Source§

fn clone(&self) -> FloatOp

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FloatOp

Source§

impl Debug for FloatOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.