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.



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

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.



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

def gosu_to_radians(); end

#radians_to_degreesFloat

Converts radians to degrees.

Returns:

  • (Float)

    degrees.



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

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.



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

def radians_to_gosu(); end