spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Maths functions and properties

DegreesToRadians

float Maths.DegreesToRadians(float degrees)
Converts the supplied angle in degrees, to the equivalent angle in radians.

Since the trigonometric functions such as Sin, Cos and Tan work in radians, this function is handy if you know the angle you want in degrees.

Example:

float cosine = Maths.Cos(Maths.DegreesToRadians(360.0));
calculates the cosine of 360 degrees (which is 1.0) and places it into variable cosine.

See Also: Maths.Cos, Maths.RadiansToDegrees, Maths.Sin, Maths.Tan


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.