struct Units::Term
- Units::Term
- Struct
- Value
- Object
Included Modules
- Comparable(Units::Term)
- Units::Compatible
Defined in:
units/term.crConstructors
Instance Method Summary
- #*(other : Unit | Term | Number)
- #**(other : Number)
- #/(other : Unit | Term | Number)
- #atom : Atom | Nil
- #depth : Int32
- #exponent : Int32
- #factor : BigDecimal
- #magnitude(scalar = scalar())
- #note : String | Nil
- #operate(operator : Operation, other : Number) : Term
- #operate(operator : Operation, other : Unit | Term) : Unit
- #prefix
- #root_terms : Array(Term)
- #scalar(magnitude = 1)
- #special?
- #terminal?
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)
#