Enum roqoqo::CalculatorFloat [−][src]
Expand description
CalculatorFloat is an enum combining Float and String.
Variants
Float
- f64 valueStr
- String instance
Variants
Float(f64)
Floating point value
Tuple Fields of Float
0: f64
Str(String)
Symbolic expression in String form
Tuple Fields of Str
0: String
Implementations
Constant zero for CalculatorFloat
Constant one for CalculatorFloat
Constant pi for CalculatorFloat
Constant Euler’s number e for CalculatorFloat
Constant 1/sqrt(2) e for CalculatorFloat
Constant pi / 2 e for CalculatorFloat
Constant pi / 4 e for CalculatorFloat
Constant sqrt(2) e for CalculatorFloat
Return True when CalculatorFloat does not contain symbolic expression.
Return square root of CalculatorFloat.
Return atan2 for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Return Power for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Return exponential function exp(x) for CalculatorFloat.
Return sine function sin(x) for CalculatorFloat.
Return cosine function cos(x) for CalculatorFloat.
Return arccosine function acos(x) for CalculatorFloat.
Return absolute value abs(x) for CalculatorFloat.
Return signum value sign(x) for CalculatorFloat.
Return True if self value is close to other value.
Return Some(f64) when CalculatorFloat is a numeric value
Return inverse/reciprocal function (1/x) for CalculatorFloat.
Trait Implementations
Implement +
(add) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the +
operator.
Performs the +
operation. Read more
Implement +
(add) for &CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the +
operator.
Performs the +
operation. Read more
Implement +=
(add) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Performs the +=
operation. Read more
pub fn deserialize<D>(
deserializer: D
) -> Result<CalculatorFloat, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<CalculatorFloat, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Implement Display trait for CalculatorFloat.
Allows use of simple text formating
Implement /
(divide) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Panics
Panics on division by zero. Division by zero is only detected when other is converted to CalculatorFloat::Float
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the /
operator.
Performs the /
operation. Read more
Implement /=
(divide) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Panics
Panics on division by zero. Division by zero is only detected when other is converted to CalculatorFloat::Float
Performs the /=
operation. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Implement *
(multiply) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the *
operator.
Performs the *
operation. Read more
Implement *=
(multiply) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Performs the *=
operation. Read more
Implement minus sign for CalculatorFloat.
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the -
operator.
Performs the unary -
operation. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Implement -
(subtract) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the -
operator.
Performs the -
operation. Read more
Implement -=
(subtract) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for CalculatorFloat
impl Send for CalculatorFloat
impl Sync for CalculatorFloat
impl Unpin for CalculatorFloat
impl UnwindSafe for CalculatorFloat
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.