Frequency

public struct Frequency : NewType, SignedNumeric

Periodic vibration in Hertz.

Example Usage

let nice = Frequency(440.0) // => "a 440"
let mean: Frequency = 440.0 // => "a 440"
  • The value of this Frequency in Hz (i.e., cycles per second).

    Declaration

    Swift

    public let value: Double
  • Creates a Frequency with the given value in Hz (i.e., cycles per second).

    Declaration

    Swift

    public init(value: Double)
  • Creates a Frequency with the given ratio and the given reference Frequency.

    Declaration

    Swift

    public init(_ ratio: Fraction, reference: Frequency)