Class: Float

Inherits:
Object
  • Object
show all
Defined in:
lib/rtranscoder/extensions/float.rb

Instance Method Summary collapse

Instance Method Details

#HzObject

Returns the Float in Hz as an Integer.

25.05.Hz # => 2505


8
9
10
# File 'lib/rtranscoder/extensions/float.rb', line 8

def Hz
  self.to_i
end

#kHzObject

Returns the Float in kHz as an Integer.

1.337.kHz # => 1337


17
18
19
# File 'lib/rtranscoder/extensions/float.rb', line 17

def kHz
  (self * 1000).Hz
end

#mHzObject

Returns the Float in kHz as an Integer.

2.6.mHz # => 2600000


26
27
28
# File 'lib/rtranscoder/extensions/float.rb', line 26

def mHz
  (self * 1000_000).Hz
end