module Math
Extended Modules
Defined in:
mittsu/math.cr
Constant Summary
-
DEGREE_TO_RADIANS_FACTOR =
::Math::PI / 180
-
RADIANS_TO_DEGREES_FACTOR =
180 / ::Math::PI
Class Method Summary
-
.clamp(x, a, b)
-
.clamp_bottom(x, a)
-
.deg_to_rad(degrees)
-
.map_linear(x, a1, a2, b1, b2)
-
.next_power_of_two(value)
-
.power_of_two?(value)
-
.rad_to_deg(radians)
-
.rand_float(low, high)
-
.rand_float_spread(range)
-
.rand_int(low, high)
-
.random16
-
.sign(x)
-
.smooth_step(x, min, max)
-
.smoother_step(x, min, max)
Class Method Detail
def self.
clamp(x, a, b)
#
def self.
clamp_bottom(x, a)
#
def self.
deg_to_rad(degrees)
#
def self.
map_linear(x, a1, a2, b1, b2)
#
def self.
next_power_of_two(value)
#
def self.
power_of_two?(value)
#
def self.
rad_to_deg(radians)
#
def self.
rand_float(low, high)
#
def self.
rand_float_spread(range)
#
def self.
rand_int(low, high)
#
def self.
smooth_step(x, min, max)
#
def self.
smoother_step(x, min, max)
#