Struct tune::pitch::NearestFraction
source · [−]pub struct NearestFraction {
pub numer: u16,
pub denom: u16,
pub deviation: Ratio,
pub num_octaves: i32,
}
Expand description
An odd-limit nearest-fraction approximation fo a given Ratio
.
Fields
numer: u16
The numerator of the approximation.
denom: u16
The denominator of the approximation.
deviation: Ratio
The deviation of the target value from the approximation.
num_octaves: i32
The number of even factors that have been removed from the approximation to account for octave equivalence.
Trait Implementations
sourceimpl Clone for NearestFraction
impl Clone for NearestFraction
sourcefn clone(&self) -> NearestFraction
fn clone(&self) -> NearestFraction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NearestFraction
impl Debug for NearestFraction
sourceimpl Display for NearestFraction
impl Display for NearestFraction
impl Copy for NearestFraction
Auto Trait Implementations
impl RefUnwindSafe for NearestFraction
impl Send for NearestFraction
impl Sync for NearestFraction
impl Unpin for NearestFraction
impl UnwindSafe for NearestFraction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more