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

Class Method Detail

def self.clamp(x, a, b) #

[View source]
def self.clamp_bottom(x, a) #

[View source]
def self.deg_to_rad(degrees) #

[View source]
def self.map_linear(x, a1, a2, b1, b2) #

[View source]
def self.next_power_of_two(value) #

[View source]
def self.power_of_two?(value) #

[View source]
def self.rad_to_deg(radians) #

[View source]
def self.rand_float(low, high) #

[View source]
def self.rand_float_spread(range) #

[View source]
def self.rand_int(low, high) #

[View source]
def self.random16 #

[View source]
def self.sign(x) #

[View source]
def self.smooth_step(x, min, max) #

[View source]
def self.smoother_step(x, min, max) #

[View source]