Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/rtranscoder/extensions/float.rb
Instance Method Summary collapse
-
#Hz ⇒ Object
Returns the
Float
in Hz as anInteger
. -
#kHz ⇒ Object
Returns the
Float
in kHz as anInteger
. -
#mHz ⇒ Object
Returns the
Float
in kHz as anInteger
.
Instance Method Details
#Hz ⇒ Object
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 |
#kHz ⇒ Object
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 |
#mHz ⇒ Object
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 |