Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
reference/gosu.rb

Overview

Small additions to Numeric to make it easier to integrate Gosu with libraries that use radians, like Chipmunk.

Instance Method Summary (collapse)

Instance Method Details

- (Object) degrees_to_radians

Scales a degree value to radians.



693
# File 'reference/gosu.rb', line 693

def degrees_to_radians(); end

- (Object) gosu_to_radians

Returns (self - 90) * Math::PI / 180.0 Translates between Gosu’s angle system (where 0° is at the top) and radians (where 0 is at the right).



690
# File 'reference/gosu.rb', line 690

def gosu_to_radians(); end

- (Object) radians_to_degrees

Scales a radian value to degrees.



696
# File 'reference/gosu.rb', line 696

def radians_to_degrees(); end

- (Object) radians_to_gosu

Returns self * 180.0 / Math::PI + 90. Translates between Gosu’s angle system (where 0° is at the top) and radians (where 0 is at the right).



685
# File 'reference/gosu.rb', line 685

def radians_to_gosu(); end