Sha256: 560acae4a77bc1390db1590b03b0eac09443a5651452e8e5769df93694ebf651

Contents?: true

Size: 619 Bytes

Versions: 18

Compression:

Stored size: 619 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

UnitMeasurements::Frequency = UnitMeasurements.build do
  primitive "Hz"

  system :metric do
    si_unit "Hz", aliases: ["hertz", "hertzes"]

    unit "rad/s", value: [Rational(1, (2 * Math::PI)), "Hz"], aliases: ["rad·s⁻¹", "radian per second", "radians per second"]
  end

  unit "deg/s", value: [Rational(1, 360), "Hz"], aliases: ["°/s", "deg·s⁻¹", "degree per second", "degrees per second"]
  unit "rev/s", value: [1, "Hz"], aliases: ["rps", "rev·s⁻¹", "revolution per second", "revolutions per second"]
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
unit_measurements-5.6.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.5.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.4.1 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.4.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.3.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.2.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.1.1 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.1.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-5.0.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.12.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.11.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.10.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.9.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.8.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.7.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.6.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.5.0 lib/unit_measurements/unit_groups/frequency.rb
unit_measurements-4.4.0 lib/unit_measurements/unit_groups/frequency.rb