lib/differential/calculator/totals.rb in differential-1.0.5 vs lib/differential/calculator/totals.rb in differential-1.0.6
- old
+ new
@@ -14,18 +14,20 @@
# - b_sigma is the sum of data set B's values.
# - delta is the difference: b_sigma - a_sigma.
class Totals
include ::Differential::Calculator::Side
+ DIGITS = 6
+
attr_reader :a_sigma,
:a_size,
:b_sigma,
:b_size
def initialize
- @a_sigma = 0
+ @a_sigma = BigDecimal(0, DIGITS)
@a_size = 0
- @b_sigma = 0
+ @b_sigma = BigDecimal(0, DIGITS)
@b_size = 0
end
def delta
b_sigma - a_sigma