OrderedInterval

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

The ordered interval between two NoteNumberRepresentable-conforming type values.

  • Creates an OrderedInterval with the given noteNumber value.

    Declaration

    Swift

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

    Example Usage

    let ray: Pitch = 62
    let tea: Pitch = 59
    let _ = OrderedInterval(ray,tea) // => -3
    

    Declaration

    Swift

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