lib/lite/ruby/numeric.rb in lite-ruby-1.0.3 vs lib/lite/ruby/numeric.rb in lite-ruby-1.0.4
- old
+ new
@@ -118,9 +118,17 @@
num >= self
end
alias lteq? less_than_or_equal_to?
+ def markdown_percentage(percent)
+ to_f * ((100.0 - percent.to_f) / 100.0)
+ end
+
+ def markup_percentage(percent)
+ to_f + (to_f * (percent.to_f / 100.0))
+ end
+
def multiply(num)
self * num
end
def multiple_of?(number)