struct

Quartz::Scale

Inherits JSON::Serializable / Comparable / Comparable / Struct / Value / Object

Scale is an approximation of the degree to which Durations must be altered to have an appreciable effect on the implications of a model or the results of a simulation.

Constants

ATTO = new(-6)
BASE = new(0)
EXA = new(6)
FACTOR = 1000_i64

The base constant ß is a factor that separates one allowable time unit from the next.

FEMTO = new(-5)
GIGA = new(3)
KILO = new(1)
MEGA = new(2)
MICRO = new(-2)
MILLI = new(-1)
NANO = new(-3)
PETA = new(5)
PICO = new(-4)
TERA = new(4)
YOCTO = new(-8)
YOTTA = new(8)
ZEPTO = new(-7)
ZETTA = new(7)

Constructors

new(scale : Int)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

+(other : Int) : Scale

Returns the result of adding self and other.

Source
-(other : Int) : Scale

Returns the result of subtracting self and other.

Source
-(other : Scale) : Int32

Returns an integer which represent the distance between two given scales.

Source
-

Negates self.

Source
/(other : Scale) : Float64

Returns the result of dividing self and other.

Source
<=>(other : Scale) : Int32
Source
<=>(other : Number) : Int32

The comparison operator. Returns 0 if the two objects are equal, a negative number if this object is considered less than other, a positive number if this object is considered greater than other, or nil if the two objects are not comparable.

Subclasses define this method to provide class-specific ordering.

The comparison operator is usually used to sort values:

# Sort in a descending way:
[3, 1, 2].sort { |x, y| y <=> x } # => [3, 2, 1]

# Sort in an ascending way:
[3, 1, 2].sort { |x, y| x <=> y } # => [1, 2, 3]
Source
clone

Returns a copy of self with all instance variables cloned.

Source
level

The level of accuracy.

Source
to_f
Source
to_f32
Source
to_f64
Source