pub fn from_chromatic_span(size: &IntervalSize, span: isize) -> IntervalQuality {
        use IntervalSize::*;
        let delta = span - size.chromatic_size() as isize;
        match size {
            Unison | Fourth | Fifth => {
                match delta {
                    isize::MIN..=-1 => IntervalQuality::Diminished((-delta as usize) - 1),
                    0 => IntervalQuality::Perfect,
                    _ => IntervalQuality::Augmented(delta as usize - 1),
                }
            },
            Second | Third | Sixth | Seventh => {
                match delta {
                    isize::MIN..=-2 => IntervalQuality::Diminished((-delta - 1) as usize - 1),
                    -1 => IntervalQuality::Minor,
                    0 => IntervalQuality::Major,
                    _ => IntervalQuality::Augmented(delta as usize - 1)
                }
            }
        }
    }
/// Given the interval size, (how many note names are between the top and bottom) calculate an interval
/// quality that will make the [`Interval`] span the correct number of whole steps.
Given the interval size, (how many note names are between the top and bottom) calculate an interval
quality that will make the [`Interval`] span the correct number of whole steps.
Given the interval size ( how many note names are between the top and bottom ) calculate an interval quality that will make the [ ` Interval ` ] span the correct number of whole steps .
pub fn from_chromatic_span(size: &IntervalSize, span: isize) -> IntervalQuality {
        use IntervalSize::*;
        let delta = span - size.chromatic_size() as isize;
        match size {
            Unison | Fourth | Fifth => {
                match delta {
                    isize::MIN..=-1 => IntervalQuality::Diminished((-delta as usize) - 1),
                    0 => IntervalQuality::Perfect,
                    _ => IntervalQuality::Augmented(delta as usize - 1),
                }
            },
            Second | Third | Sixth | Seventh => {
                match delta {
                    isize::MIN..=-2 => IntervalQuality::Diminished((-delta - 1) as usize - 1),
                    -1 => IntervalQuality::Minor,
                    0 => IntervalQuality::Major,
                    _ => IntervalQuality::Augmented(delta as usize - 1)
                }
            }
        }
    }
pub fn from_chromatic_span ( size : & IntervalSize , span : isize ) -> IntervalQuality { use IntervalSize :: * ; let delta = span - size . chromatic_size ( ) as isize ; match size { Unison | Fourth | Fifth => { match delta { isize :: MIN ..= - 1 => IntervalQuality :: Diminished ( ( - delta as usize ) - 1 ) , 0 => IntervalQuality :: Perfect , _ => IntervalQuality :: Augmented ( delta as usize - 1 ) , } } , Second | Third | Sixth | Seventh => { match delta { isize :: MIN ..= - 2 => IntervalQuality :: Diminished ( ( - delta - 1 ) as usize - 1 ) , - 1 => IntervalQuality :: Minor , 0 => IntervalQuality :: Major , _ => IntervalQuality :: Augmented ( delta as usize - 1 ) } } } }
Given the interval size, (how many note names are between the top and bottom) calculate an interval
quality that will make the [`Interval`] span the correct number of whole steps.
Given the interval size ( how many note names are between the top and bottom ) calculate an interval quality that will make the [ ` Interval ` ] span the correct number of whole steps .
size
&IntervalSize
span
isize