Number
Inherits Steppable < Comparable < Value < Object
The top-level number type.
Instance methods
Scales a matrix by this amount.
5 * Matrix[[1, 2, 3], [4, 5, 6]] # => [[5, 10, 15], [20, 25, 30]]
Scales a vector by this amount.
5 * Vector[2, 3, 4] # => (10, 15, 20)
gradians
Returns a Geode::Gradians of self gradians.
100.gradians # => 100 grad
See: Geode::Gradians
radians
Returns a Geode::Radians of self radians.
Math::PI.radians # => 3.14 rad
See: Geode::Radians
to_degrees
Returns a Geode::Degrees of self radians.
(Math::PI / 4).to_degrees # => 45°
See: Geode::Degrees
to_gradians
Returns a Geode::Gradians of self radians.
(Math::PI / 4).to_gradians # => 100.0 grad
See: Geode::Gradians
to_radians
Returns a Geode::Radians of self radians.
Math::PI.to_radians # => 3.14 rad
See: Geode::Radians
to_turns
Returns a Geode::Turns of self radians.
(Math::PI / 4).to_turns # => 0.25 turns
See: Geode::Turns