Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- 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
-
#degrees_to_radians ⇒ Float
Converts degrees to radians.
-
#gosu_to_radians ⇒ Float
Converts a Gosu-compatible angle to radians using the formula
(self - 90) * Math::PI / 180.0
. -
#radians_to_degrees ⇒ Float
Converts radians to degrees.
-
#radians_to_gosu ⇒ Float
Converts radians to a Gosu-compatible angle using the formula
self * 180.0 / Math::PI + 90
.
Instance Method Details
#degrees_to_radians ⇒ Float
Converts degrees to radians.
1429 |
# File 'rdoc/gosu.rb', line 1429 def degrees_to_radians(); end |
#gosu_to_radians ⇒ Float
Converts a Gosu-compatible angle to radians using the formula (self - 90) * Math::PI / 180.0
.
1423 |
# File 'rdoc/gosu.rb', line 1423 def gosu_to_radians(); end |
#radians_to_degrees ⇒ Float
Converts radians to degrees.
1435 |
# File 'rdoc/gosu.rb', line 1435 def radians_to_degrees(); end |
#radians_to_gosu ⇒ Float
Converts radians to a Gosu-compatible angle using the formula self * 180.0 / Math::PI + 90
.
1417 |
# File 'rdoc/gosu.rb', line 1417 def radians_to_gosu(); end |