# 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

• Converts degrees to radians.

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

• Converts radians to degrees.

• 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.

Returns:

• (Float)

 ``` 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`.

Returns:

• (Float)

 ``` 1423``` ```# File 'rdoc/gosu.rb', line 1423 def gosu_to_radians(); end```

### #radians_to_degrees ⇒ Float

Converts radians to degrees.

Returns:

• (Float)

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`.

Returns:

• (Float)

degrees.

 ``` 1417``` ```# File 'rdoc/gosu.rb', line 1417 def radians_to_gosu(); end```