Sha256: 30bd75f7c67993472b904634c51c002a98cd9d157154ba928f11ae657a785490
Contents?: true
Size: 446 Bytes
Versions: 1
Compression:
Stored size: 446 Bytes
Contents
module Danica class Function class Division < Function attr_accessor :numerator, :denominator def to_f numerator.to_f / denominator.to_f end def to_tex "\\frac{#{numerator.to_tex}}{#{denominator.to_tex}}" end def numerator=(value) @numerator ||= wrap_value(value) end def denominator=(value) @denominator ||= wrap_value(value) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
danica-0.1.0 | lib/danica/function/division.rb |