struct Units::Term

Included Modules

Defined in:

units/term.cr

Constructors

Instance Method Summary

Instance methods inherited from module Units::Compatible

<=>(other) <=>, compatible_with?(other) compatible_with?, composition : Multiset(String) composition, composition_string : String composition_string, dimension dimension

Constructor Detail

def self.new(atom : Units::Atom | Nil = nil, prefix = Prefix::None, factor : Number = 1, exponent : Number = 1, note : String | Nil = nil) #

[View source]

Instance Method Detail

def *(other : Unit | Term | Number) #

[View source]
def **(other : Number) #

[View source]
def /(other : Unit | Term | Number) #

[View source]
def atom : Atom | Nil #

[View source]
def depth : Int32 #

[View source]
def exponent : Int32 #

[View source]
def factor : BigDecimal #

[View source]
def magnitude(scalar = scalar()) #

[View source]
def note : String | Nil #

[View source]
def operate(operator : Operation, other : Number) : Term #

[View source]
def operate(operator : Operation, other : Unit | Term) : Unit #

[View source]
def prefix #

[View source]
def root_terms : Array(Term) #

[View source]
def scalar(magnitude = 1) #

[View source]
def special? #

[View source]
def terminal? #

[View source]