Float

Struct Float 

Source
pub struct Float {
    pub val: Float,
}

Fields§

§val: Float

Implementations§

Source§

impl Float

Source

pub fn with_val<T>(prec: u32, val: T) -> Self
where Float: Assign<T>,

Source

pub fn to_integer(&self) -> Option<Integer>

Source§

impl Float

Trait Implementations§

Source§

impl<'a> Add<&'a Float> for Float

Source§

type Output = Float

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, B> Add<B> for &'a Float
where Float: Add<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the + operator.
Source§

fn add(self, rhs: B) -> Self::Output

Performs the + operation. Read more
Source§

impl<B> Add<B> for Float
where Float: Add<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the + operator.
Source§

fn add(self, rhs: B) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<Float> for &'a Float

Source§

type Output = Float

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Float) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add for &'a Float

Source§

type Output = Float

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Float) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Float

Source§

type Output = Float

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Float) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> AddAssign<&'a Float> for Float

Source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
Source§

impl<B> AddAssign<B> for Float
where Float: AddAssign<B>,

Source§

fn add_assign(&mut self, rhs: B)

Performs the += operation. Read more
Source§

impl AddAssign for Float

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl ArchimedeanDiv for Float

Source§

fn embed_nat<N: Natural>(n: N) -> Self

Maps a natural number into this structure preserving addition and using the relevant canonical representation Read more
Source§

fn div_arch(self, rhs: Self) -> Self

the unique integer n such that n*rhs <= self and (n+1)*rhs > self
Source§

fn rem_arch(self, rhs: Self) -> Self

the remaining difference after dividing by rhs (ie. self - self.div_arch(rhs)*rhs)
Source§

fn div_alg_arch(self, rhs: Self) -> (Self, Self)

Divides self by rhs with remainder using the archimdean property Read more
Source§

impl CheckedAdd for Float

Source§

fn checked_add(&self, v: &Self) -> Option<Self>

Adds two numbers, checking for overflow. If overflow happens, None is returned.
Source§

impl CheckedDiv for Float

Source§

fn checked_div(&self, v: &Self) -> Option<Self>

Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned.
Source§

impl CheckedMul for Float

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned.
Source§

impl CheckedNeg for Float

Source§

fn checked_neg(&self) -> Option<Self>

Negates a number, returning None for results that can’t be represented, like signed MIN values that can’t be positive, or non-zero unsigned values that can’t be negative. Read more
Source§

impl CheckedRem for Float

Source§

fn checked_rem(&self, v: &Self) -> Option<Self>

Finds the remainder of dividing two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more
Source§

impl CheckedSub for Float

Source§

fn checked_sub(&self, v: &Self) -> Option<Self>

Subtracts two numbers, checking for underflow. If underflow happens, None is returned.
Source§

impl Clone for Float

Source§

fn clone(&self) -> Float

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl ComplexSubset for Float

Source§

type Real = Float

Source§

type Natural = Integer

Source§

type Integer = Integer

Source§

fn as_real(self) -> Self::Real

Converts self to a real number, discarding any imaginary component, if complex.
Source§

fn as_natural(self) -> Self::Natural

Converts self to a natural number, truncating when necessary.
Source§

fn as_integer(self) -> Self::Integer

Converts self to an integer, truncating when necessary.
Source§

fn floor(self) -> Self

Rounds the real and imaginary components of self to the closest integer downward
Source§

fn ceil(self) -> Self

Rounds the real and imaginary components of self to the closest integer upward
Source§

fn round(self) -> Self

Rounds the real and imaginary components of self to the closest integer
Source§

fn trunc(self) -> Self

Rounds the real and imaginary components of self by removing the factional parts
Source§

fn fract(self) -> Self

Removes the integral parts of the real and imaginary components of self
Source§

fn im(self) -> Self

Sets the real component of self to 0
Source§

fn re(self) -> Self

Sets the imaginary component of self to 0
Source§

fn conj(self) -> Self

The complex conjugate of self
Source§

fn modulus_sqrd(self) -> Self

The square of the complex absolute value of self Read more
Source§

fn modulus(self) -> Self::Real

The complex absolute value of self Read more
Source§

impl Debug for Float

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for Float

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a> Div<&'a Float> for Float

Source§

type Output = Float

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, B> Div<B> for &'a Float
where Float: Div<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the / operator.
Source§

fn div(self, rhs: B) -> Self::Output

Performs the / operation. Read more
Source§

impl<B> Div<B> for Float
where Float: Div<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the / operator.
Source§

fn div(self, rhs: B) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div<Float> for &'a Float

Source§

type Output = Float

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Float) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div for &'a Float

Source§

type Output = Float

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a Float) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for Float

Source§

type Output = Float

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Float) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> DivAssign<&'a Float> for Float

Source§

fn div_assign(&mut self, rhs: &Self)

Performs the /= operation. Read more
Source§

impl<B> DivAssign<B> for Float
where Float: DivAssign<B>,

Source§

fn div_assign(&mut self, rhs: B)

Performs the /= operation. Read more
Source§

impl DivAssign for Float

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl Divisibility for Float

Source§

fn divides(self, rhs: Self) -> bool

Determines if there exists an element x such that self*x = rhs
Source§

fn divide(self, rhs: Self) -> Option<Self>

Finds an element x such that self*x = rhs if such an element exists
Source§

fn unit(&self) -> bool

Determines if this element has a multiplicative inverse
Source§

fn inverse(self) -> Option<Self>

Finds this element’s multiplicative inverse if it exists
Source§

impl EuclideanDiv for Float

Source§

type Naturals = Integer

The specific type used for the Euclidean Norm
Source§

fn euclid_norm(&self) -> Self::Naturals

A measure of the “degree” of a given element. Read more
Source§

fn div_euc(self, rhs: Self) -> Self

The quotient from Euclidean division
Source§

fn rem_euc(self, rhs: Self) -> Self

The remainder from the Euclidean division
Source§

fn div_alg(self, rhs: Self) -> (Self, Self)

Divides a pair of elements with remainder Read more
Source§

impl Exponential for Float

Source§

fn exp(self) -> Self

The exponential of this ring element Read more
Source§

fn try_ln(self) -> Option<Self>

An inverse of exp(x) where ln(1) = 0 Read more
Source§

impl From<Float> for Float

Source§

fn from(src: Float) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Float

Source§

fn from(src: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Float

Source§

fn from(src: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for Float

Source§

fn from(src: i128) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Float

Source§

fn from(src: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Float

Source§

fn from(src: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Float

Source§

fn from(src: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for Float

Source§

fn from(src: i8) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for Float

Source§

fn from(src: isize) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for Float

Source§

fn from(src: u128) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Float

Source§

fn from(src: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Float

Source§

fn from(src: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for Float

Source§

fn from(src: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Float

Source§

fn from(src: u8) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for Float

Source§

fn from(src: usize) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for Float

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an 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_u64(n: u64) -> Option<Self>

Converts an 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_isize(n: isize) -> Option<Self>

Converts an 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<Self>

Converts an 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<Self>

Converts an 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<Self>

Converts an 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_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a 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<Self>

Converts an 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<Self>

Converts an 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<Self>

Converts an 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_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

impl Inv for Float

Source§

type Output = Float

The result after applying the operator.
Source§

fn inv(self) -> Self::Output

Returns the multiplicative inverse of self. Read more
Source§

impl<'a> Mul<&'a Float> for Float

Source§

type Output = Float

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, B> Mul<B> for &'a Float
where Float: Mul<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: B) -> Self::Output

Performs the * operation. Read more
Source§

impl<B> Mul<B> for Float
where Float: Mul<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: B) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<Float> for &'a Float

Source§

type Output = Float

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Float) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul for &'a Float

Source§

type Output = Float

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Float) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Float

Source§

type Output = Float

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Float) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> MulAssign<&'a Float> for Float

Source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
Source§

impl<B> MulAssign<B> for Float
where Float: MulAssign<B>,

Source§

fn mul_assign(&mut self, rhs: B)

Performs the *= operation. Read more
Source§

impl MulAssign for Float

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for Float

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl One for Float

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl PartialEq for Float

Source§

fn eq(&self, other: &Float) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Float

Source§

fn partial_cmp(&self, other: &Float) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Real for Float

Source§

fn approx(self) -> f64

Approximates this real number as a 64-bit floating point Read more
Source§

fn repr(f: f64) -> Self

Constructs a real number from a 64-bit floating point Read more
Source§

impl RealExponential for Float

Source§

fn try_pow(self, power: Self) -> Option<Self>

This element raised to the given power as defined by x^y = exp(ln(x)*y), if ln(x) exists
Source§

fn try_root(self, index: Self) -> Option<Self>

This element taken to the given root as defined as root(x, y) = x^(1/y), if ln(x) and 1/y exist
Source§

fn try_log(self, base: Self) -> Option<Self>

The inverse of pow(), if it exists
Source§

fn ln(self) -> Self

The natural logarithm of self Read more
Source§

fn log(self, base: Self) -> Self

The logarithm of self over a specific base Read more
Source§

fn pow(self, p: Self) -> Self

The power of self over a specific exponent Read more
Source§

fn root(self, r: Self) -> Self

The root of self over a specific index Read more
Source§

fn exp2(self) -> Self

Raises 2 to the power of self
Source§

fn exp10(self) -> Self

Raises 10 to the power of self
Source§

fn log2(self) -> Self

The logarithm of base 2
Source§

fn log10(self) -> Self

The logarithm of base 10
Source§

fn sqrt(self) -> Self

Source§

fn cbrt(self) -> Self

Source§

fn ln_1p(self) -> Self

The natural logarithm of self plus 1. Read more
Source§

fn exp_m1(self) -> Self

The exponential of self minus 1. Read more
Source§

fn e() -> Self

The exponential of 1. Mirrors ::core::f32::consts::E
Source§

fn ln_2() -> Self

The natural logarithm of 2. Mirrors ::core::f32::consts::LN_2
Source§

fn ln_10() -> Self

The natural logarithm of 10. Mirrors ::core::f32::consts::LN_10
Source§

fn log2_e() -> Self

The logarithm base 2 of e. Mirrors ::core::f32::consts::LOG2_E
Source§

fn log10_e() -> Self

The logarithm base 10 of e. Mirrors ::core::f32::consts::LOG10_E
Source§

fn log2_10() -> Self

The logarithm base 2 of 10. Mirrors ::core::f32::consts::LOG2_10
Source§

fn log10_2() -> Self

The logarithm base 10 of 2. Mirrors ::core::f32::consts::LOG10_2
Source§

fn sqrt_2() -> Self

The square root of 2. Mirrors ::core::f32::consts::SQRT_2
Source§

fn frac_1_sqrt_2() -> Self

One over the square root of 2. Mirrors ::core::f32::consts::FRAC_1_SQRT_2
Source§

impl<'a> Rem<&'a Float> for Float

Source§

type Output = Float

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, B> Rem<B> for &'a Float
where Float: Rem<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: B) -> Self::Output

Performs the % operation. Read more
Source§

impl<B> Rem<B> for Float
where Float: Rem<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: B) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a> Rem<Float> for &'a Float

Source§

type Output = Float

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Float) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a> Rem for &'a Float

Source§

type Output = Float

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'a Float) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for Float

Source§

type Output = Float

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Float) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a> RemAssign<&'a Float> for Float

Source§

fn rem_assign(&mut self, rhs: &Self)

Performs the %= operation. Read more
Source§

impl<B> RemAssign<B> for Float
where Float: RemAssign<B>,

Source§

fn rem_assign(&mut self, rhs: B)

Performs the %= operation. Read more
Source§

impl RemAssign for Float

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl Sign for Float

Source§

fn signum(self) -> Self

Returns 1 if positive, -1 if negative, or itself (ie. 0 or NaN) if neither
Source§

fn abs(self) -> Self

Returns this element’s negative if less than 0 or itself otherwise
Source§

impl<'a> Sub<&'a Float> for Float

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, B> Sub<B> for &'a Float
where Float: Sub<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: B) -> Self::Output

Performs the - operation. Read more
Source§

impl<B> Sub<B> for Float
where Float: Sub<B, Output = Float>,

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: B) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<Float> for &'a Float

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Float) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub for &'a Float

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Float) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Float

Source§

type Output = Float

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Float) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> SubAssign<&'a Float> for Float

Source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
Source§

impl<B> SubAssign<B> for Float
where Float: SubAssign<B>,

Source§

fn sub_assign(&mut self, rhs: B)

Performs the -= operation. Read more
Source§

impl SubAssign for Float

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl ToPrimitive for Float

Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

impl Trig for Float

Source§

fn sin(self) -> Self

Finds the Sine of the given value Read more
Source§

fn cos(self) -> Self

Finds the Cosine of the given value Read more
Source§

fn tan(self) -> Self

Finds the Tangent of the given value Read more
Source§

fn sinh(self) -> Self

Finds the Hyperbolic Sine of the given value Read more
Source§

fn cosh(self) -> Self

Finds the Hyperbolic Cosine of the given value Read more
Source§

fn tanh(self) -> Self

Finds the Hyperbolic Tangent of the given value Read more
Source§

fn asin(self) -> Self

A continuous inverse function of Sine such that asin(1) = π/2 and asin(-1) = -π/2 Read more
Source§

fn acos(self) -> Self

A continuous inverse function of Cosine such that acos(1) = 0 and asin(-1) = π Read more
Source§

fn atan(self) -> Self

A continuous inverse function of Tangent such that atan(0) = 0 and atan(1) = π/4
Source§

fn asinh(self) -> Self

A continuous inverse function of Hyperbolic Sine such that asinh(0)=0 Read more
Source§

fn acosh(self) -> Self

A continuous inverse function of Hyperbolic Cosine such that acosh(0)=1 Read more
Source§

fn atanh(self) -> Self

A continuous inverse function of Hyperbolic Tangent such that atanh(0)=0 Read more
Source§

fn try_asin(self) -> Option<Self>

A continuous inverse function of Sine such that asin(1) = π/2 and asin(-1) = -π/2 Read more
Source§

fn try_acos(self) -> Option<Self>

A continuous inverse function of Cosine such that acos(1) = 0 and asin(-1) = π Read more
Source§

fn try_asinh(self) -> Option<Self>

A continuous inverse function of Hyperbolic Sine such that asinh(0)=0 Read more
Source§

fn try_acosh(self) -> Option<Self>

A continuous inverse function of Hyperbolic Cosine such that acosh(0)=1 Read more
Source§

fn try_atanh(self) -> Option<Self>

A continuous inverse function of Hyperbolic Tangent such that atanh(0)=0 Read more
Source§

fn atan2(y: Self, x: Self) -> Self

A continuous function of two variables where tan(atan2(y,x)) = y/x for y!=0 and atan2(0,1) = 0 Read more
Source§

fn pi() -> Self

The classic cicle constant Read more
Source§

fn sin_cos(self) -> (Self, Self)

Finds both the Sine and Cosine as a tuple Read more
Source§

fn frac_2_pi() -> Self

2/π. Mirrors FRAC_2_PI
Source§

fn frac_pi_2() -> Self

π/2. Mirrors FRAC_PI_2
Source§

fn frac_pi_3() -> Self

π/3. Mirrors FRAC_PI_3
Source§

fn frac_pi_4() -> Self

π/4. Mirrors FRAC_PI_4
Source§

fn frac_pi_6() -> Self

π/6. Mirrors FRAC_PI_6
Source§

fn frac_pi_8() -> Self

π/8. Mirrors FRAC_PI_8
Source§

fn pythag_const() -> Self

The length of the hypotenuse of a unit right-triangle. Mirrors SQRT_2
Source§

fn pythag_const_inv() -> Self

The sine of π/4. Mirrors FRAC_1_SQRT_2
Source§

fn to_degrees(self) -> Self

Source§

fn to_radians(self) -> Self

Source§

impl Zero for Float

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl AddAssociative for Float

Source§

impl AddCommutative for Float

Source§

impl AddOrdered for Float

Source§

impl ArchimedeanProperty for Float

Source§

impl Distributive for Float

Source§

impl MulAssociative for Float

Source§

impl MulCommutative for Float

Source§

impl MulOrdered for Float

Source§

impl NoZeroDivisors for Float

Source§

impl StructuralPartialEq for Float

Auto Trait Implementations§

§

impl Freeze for Float

§

impl RefUnwindSafe for Float

§

impl Send for Float

§

impl Sync for Float

§

impl Unpin for Float

§

impl UnwindSafe for Float

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> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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<G> MulN for G
where G: AddSemigroup + Zero,

Source§

fn mul_n<N>(self, n: N) -> Self
where N: Natural,

Source§

impl<G> MulZ for G
where G: AddMonoid + Negatable,

Source§

fn mul_z<N>(self, n: N) -> Self
where N: IntegerSubset,

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<G> PowN for G
where G: MulSemigroup + One,

Source§

fn pow_n<N>(self, n: N) -> Self
where N: Natural,

Source§

impl<G> PowZ for G
where G: MulMonoid + Invertable,

Source§

fn pow_z<Z>(self, n: Z) -> Self
where Z: IntegerSubset,

Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<G> Signed for G
where G: PartialOrd + Zero,

Source§

default fn positive(&self) -> bool

If this element is strictly greater than zero
Source§

default fn negative(&self) -> bool

If this element is strictly less than zero
Source§

default fn non_negative(&self) -> bool

If this element is greater than or equal to zero
Source§

default fn non_positive(&self) -> bool

If this element is less than or equal to zero
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,