In Files

Methods

Included Modules

Files

MathViz::Measurable

Something (i.e. Numeric) which does not have MathViz::Units, but can be turned into something which does (i.e., MathViz::Constant)

Public Instance Methods

per() click to toggle source

return term wrapping self with new units assigned to the denominator

# File lib/mathviz.rb, line 227
def per
  MathViz.default_term.new(self).per
end
to_value() click to toggle source

api method for unwrapping terms

# File lib/mathviz.rb, line 232
def to_value
  if kind_of? Numeric
    to_f
  else
    self
  end
end
unit(x) click to toggle source

return term wrapping self with the specified units; see also MathViz::Units::Class#new_units

# File lib/mathviz.rb, line 222
def unit(x)
  MathViz.default_term.new(self).unit(x)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.