class Units::Scale

Included Modules

Direct Known Subclasses

Defined in:

units/scale.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(function_code : String | ScaleFunction::FunctionSelection, value : Number | String, unit : String, search : Mode = Mode::PrimaryCode) #

[View source]
def self.new(value : BigDecimal, unit : Unit = Unit.new) #

[View source]
def self.new(value : BigDecimal, unit : String, mode : Mode = Mode::PrimaryCode) #

[View source]
def self.new(value : Number | String, unit : Unit = Unit.new) #

[View source]
def self.new(value : Number | String, unit : String, mode : Mode = Mode::PrimaryCode) #

[View source]
def self.new(function_code : String | ScaleFunction::FunctionSelection, value : Number | String, unit : Unit = Unit.new) #

return a ScaleFunction version of scale


[View source]

Instance Method Detail

def atoms(*args, **options) #

[View source]
def atoms(*args, **options, &) #

[View source]
def depth : Int32 #

[View source]
def inspect(io : IO) : Nil #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

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

[View source]
def mode : Mode #

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

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

[View source]
def special?(*args, **options) #

[View source]
def special?(*args, **options, &) #

[View source]
def terms(*args, **options) #

[View source]
def terms(*args, **options, &) #

[View source]
def to_s(io, mode : Mode = @mode) : Nil #

[View source]
def unit : Unit #

[View source]
def value : BigDecimal #

[View source]