pub fn inverse(&self) -> Interval {
        use IntervalSize::*;
        use IntervalQuality::*;
        let size = match self.size {
            Unison => Unison,
            Second => Seventh,
            Third => Sixth,
            Fourth => Fifth,
            Fifth => Fourth,
            Sixth => Third,
            Seventh => Second,
        };
        let quality = match self.quality {
            Diminished(degree) => Augmented(degree),
            Augmented(degree) => Diminished(degree),
            Minor => Major,
            Major => Minor,
            Perfect => Perfect,
        };
        // we can bypass the validity checks in the constructor because an inverse will always be valid
        // so long as the original interval is valid
        Interval { size, quality }
    }
/// The inverse of an interval I can be defined as the interval I&prime; such that the sum of I and I&prime; is an octave
/// (or unison, in this case)
The inverse of an interval I can be defined as the interval I′ such that the sum of I and I′ is an octave
(or unison, in this case)
The inverse of an interval I can be defined as the interval I′ such that the sum of I and I′ is an octave ( or unison in this case )
pub fn inverse(&self) -> Interval {
        use IntervalSize::*;
        use IntervalQuality::*;
        let size = match self.size {
            Unison => Unison,
            Second => Seventh,
            Third => Sixth,
            Fourth => Fifth,
            Fifth => Fourth,
            Sixth => Third,
            Seventh => Second,
        };
        let quality = match self.quality {
            Diminished(degree) => Augmented(degree),
            Augmented(degree) => Diminished(degree),
            Minor => Major,
            Major => Minor,
            Perfect => Perfect,
        };
        // we can bypass the validity checks in the constructor because an inverse will always be valid
        // so long as the original interval is valid
        Interval { size, quality }
    }
pub fn inverse ( & self ) -> Interval { use IntervalSize :: * ; use IntervalQuality :: * ; let size = match self . size { Unison => Unison , Second => Seventh , Third => Sixth , Fourth => Fifth , Fifth => Fourth , Sixth => Third , Seventh => Second , } ; let quality = match self . quality { Diminished ( degree ) => Augmented ( degree ) , Augmented ( degree ) => Diminished ( degree ) , Minor => Major , Major => Minor , Perfect => Perfect , } ; // we can bypass the validity checks in the constructor because an inverse will always be valid // so long as the original interval is valid Interval { size , quality } }
The inverse of an interval I can be defined as the interval I&prime; such that the sum of I and I&prime; is an octave
(or unison, in this case)
The inverse of an interval I can be defined as the interval I&prime ; such that the sum of I and I&prime ; is an octave ( or unison in this case )
&self