Struct monochord::Cents
[−]
[src]
pub struct Cents(pub f32);
Cent is the standard unit of musical interval.
12 EDO semitone is 100 cents large while an octave is 1200 cents large.
Methods
impl Cents
[src]
fn from_ratio(ratio: f32) -> Cents
fn to_ratio(self) -> f32
Trait Implementations
impl Debug for Cents
[src]
impl Clone for Cents
[src]
fn clone(&self) -> Cents
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Cents
[src]
impl PartialEq for Cents
[src]
fn eq(&self, __arg_0: &Cents) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Cents) -> bool
This method tests for !=
.
impl Add<Cents> for Cents
[src]
type Output = Cents
The resulting type after applying the +
operator
fn add(self, rhs: Cents) -> Self::Output
The method for the +
operator
impl Sub<Cents> for Cents
[src]
type Output = Cents
The resulting type after applying the -
operator
fn sub(self, rhs: Cents) -> Self::Output
The method for the -
operator