UnorderedInterval

public struct UnorderedInterval<Element> : NoteNumberRepresentable where Element : NoteNumberRepresentable

The unordered interval between two NoteNumberRepresentable-conforming type values.

  • Creates an UnorderedInterval with the given noteNumber value.

    Declaration

    Swift

    public init(_ noteNumber: NoteNumber)
  • Creates an UnorderedInterval between the two given NoteNumberRepresentable-conforming type values.

    Example Usage

    let dough: Pitch = 60
    let may: Pitch = 63
    let _ = UnorderedInterval(dough,may) // => 3
    
    let soul: Pitch = 67
    let lay: Pitch = 56
    let _ = UnorderedInterval(soul,lay) // => 11
    

    Declaration

    Swift

    public init(_ a: Element, _ b: Element)