Module: Numerals

Defined in:
lib/numerals/digits.rb,
lib/numerals/format.rb,
lib/numerals/numeral.rb,
lib/numerals/support.rb,
lib/numerals/version.rb,
lib/numerals/rounding.rb,
lib/numerals/conversions.rb,
lib/numerals/format/mode.rb,
lib/numerals/format/input.rb,
lib/numerals/format/sugar.rb,
lib/numerals/format/format.rb,
lib/numerals/format/output.rb,
lib/numerals/format/symbols.rb,
lib/numerals/conversions/flt.rb,
lib/numerals/format/notation.rb,
lib/numerals/format/exp_setter.rb,
lib/numerals/formatting_aspect.rb,
lib/numerals/format/base_scaler.rb,
lib/numerals/format/notations/html.rb,
lib/numerals/format/notations/text.rb,
lib/numerals/format/symbols/digits.rb,
lib/numerals/format/notations/latex.rb,
lib/numerals/format/symbols/padding.rb,
lib/numerals/conversions/context_conversion.rb

Defined Under Namespace

Modules: Conversions Classes: BigDecimalConversion, ContextConversion, Digits, FloatConversion, FltConversion, Format, FormattingAspect, FormattingStream, IntegerConversion, Numeral, NumeralError, RationalConversion, Rounding

Constant Summary collapse

VERSION =
"0.3.1"

Class Method Summary collapse

Class Method Details

.gcd(a, b) ⇒ Object



3
4
5
6
7
8
# File 'lib/numerals/support.rb', line 3

def self.gcd(a,b)
  while b!=0 do
    a,b = b, a.modulo(b)
  end
  return a.abs
end

.numerals_conversion(options = {}) ⇒ Object



228
229
230
# File 'lib/numerals/conversions/flt.rb', line 228

def (Flt::Num).numerals_conversion(options = {})
  Numerals::FltConversion.new(self, options)
end