We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Changing Angle Mode
Page Index Toggle Pages: 1
Changing Angle Mode (Read 837 times)
Changing Angle Mode
May 6th, 2008, 2:51am
 
Hey, how do you change the angle mode? I can't find any documentation on it at all.

I want to beable to make arcs in degrees, its in radians by default, and apparently I can change it, but it doesnt say how.

How do I go about swapping?
Re: Changing Angle Mode
Reply #1 - May 6th, 2008, 4:15am
 
Where are you reading that you can change it? That would be old documentation that we need to fix.

Use the functions radians() and degrees() to convert. For instance:

Code:

// Get the sine of 90 degrees
float s = sin(radians(90));
Re: Changing Angle Mode
Reply #2 - May 19th, 2009, 7:39pm
 
I just stumbled across a reference too, in the reference section for the arc. Directions for the 'start' and 'stop' parameters say "specified in radians or degrees depending on the current angle mode."
Page Index Toggle Pages: 1