Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/easy_divide/core_extentions/float.rb
Instance Method Summary collapse
Instance Method Details
#percent(*num) ⇒ Object
10 11 12 |
# File 'lib/easy_divide/core_extentions/float.rb', line 10 def percent(*num) EasyDivide::Percent.calculate(self, num) end |
#ratio(*num) ⇒ Object
6 7 8 |
# File 'lib/easy_divide/core_extentions/float.rb', line 6 def ratio(*num) EasyDivide::Ratio.calculate(self, num) end |
#to_act(num = 0) ⇒ Object
2 3 4 |
# File 'lib/easy_divide/core_extentions/float.rb', line 2 def to_act(num = 0) (self*100).round(num) end |
#with_sign ⇒ Object
14 15 16 |
# File 'lib/easy_divide/core_extentions/float.rb', line 14 def with_sign self.to_s + "%" end |