pub trait CordicNumber:
Copy
+ PartialOrd
+ AddAssign
+ SubAssign
+ Div<Output = Self>
+ Mul<Output = Self>
+ Neg<Output = Self>
+ Sub<Output = Self>
+ Add<Output = Self>
+ Shr<u8, Output = Self>
+ Shl<u8, Output = Self> {
// Required methods
fn floor(self) -> Self;
fn zero() -> Self;
fn one() -> Self;
fn frac_pi_2() -> Self;
fn pi() -> Self;
fn e() -> Self;
fn from_u0f64(val: U0F64) -> Self;
fn num_fract_bits() -> u8;
fn num_bits() -> u8;
// Provided method
fn half() -> Self { ... }
}Expand description
A number that can be used by the CORDIC-based algorithms.
This covers most fixed-point numbers, with some restriction on the maximal number of decimal bits in order to allow some constraints (like PI) to fit.
Required Methods§
fn floor(self) -> Self
fn zero() -> Self
fn one() -> Self
fn frac_pi_2() -> Self
fn pi() -> Self
fn e() -> Self
fn from_u0f64(val: U0F64) -> Self
fn num_fract_bits() -> u8
fn num_bits() -> u8
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.