Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
rdoc/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

#degrees_to_radiansFloat

Converts degrees to radians.

Returns:

  • (Float)

    radians.


1415
# File 'rdoc/gosu.rb', line 1415

def degrees_to_radians(); end

#gosu_to_radiansFloat

Converts a Gosu-compatible angle to radians using the formula (self - 90) * Math::PI / 180.0.

Returns:

  • (Float)

    radians.


1409
# File 'rdoc/gosu.rb', line 1409

def gosu_to_radians(); end

#radians_to_degreesFloat

Converts radians to degrees.

Returns:

  • (Float)

    degrees.


1421
# File 'rdoc/gosu.rb', line 1421

def radians_to_degrees(); end

#radians_to_gosuFloat

Converts radians to a Gosu-compatible angle using the formula self * 180.0 / Math::PI + 90.

Returns:

  • (Float)

    degrees.


1403
# File 'rdoc/gosu.rb', line 1403

def radians_to_gosu(); end