lib/unitwise/unit.rb in unitwise-1.0.3 vs lib/unitwise/unit.rb in unitwise-1.0.4

- old
+ new

@@ -95,10 +95,10 @@ # Get a magnitude for this unit based on a linear scale value. # Should only be used by units with special atoms in it's hierarchy. # @param scalar [Numeric] A linear scalar value # @return [Numeric] The equivalent magnitude on this scale # @api public - def magnitude(scalar = scalar) + def magnitude(scalar = scalar()) terms.reduce(1.0) do |prod, term| prod * term.magnitude(scalar) end end