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.


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

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.


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

def gosu_to_radians(); end

#radians_to_degreesFloat

Converts radians to degrees.

Returns:

  • (Float)

    degrees.


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

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.


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

def radians_to_gosu(); end