Fragment

public struct Fragment

A fragment of a Meter. Wrapping a base meter along with the range of the fragment.

  • The meter of which this is a fragment.

    Declaration

    Swift

    public let base: Meter
  • The range of the fragment in the base meter.

    Declaration

    Swift

    public let range: Range<Fraction>
  • Undocumented

    Declaration

    Swift

    public init(_ meter: Meter, in range: Range<Fraction>? = nil)
  • Create a Meter.Fragment which encompasses the totality of the given Meter.

    Declaration

    Swift

    public init(_ meter: Meter)
  • A Meter.Fragment is measured by a Fraction value.

    Declaration

    Swift

    public typealias Metric = Fraction
  • Declaration

    Swift

    public var length: Fraction { get }

    Return Value

    The fractional length of this Meter.Fraction.

  • Creates a Meter.Fragment with the given whole Meter.

    Declaration

    Swift

    public init(whole: Meter)
  • The fragment type of a Meter.Fragment is a Meter.Fragment.

    Declaration

    Swift

    public typealias Fragment = Meter.Fragment
  • Declaration

    Swift

    public func fragment(in range: Range<Fraction>) -> Fragment

    Return Value

    A Meter.Fragment in the given range.