Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

tan()

   
Examples  
float a = 0.0; 
float inc = TWO_PI/50.0; 
 
for(int i=0; i<100; i=i+2) { 
  line(i, 50, i, 50+tan(a)*2.0); 
  a = a + inc; 
} 
Description   Calculates the tangent of an angle. The tan() function expects the values of the angle parameter in radians. The tangent of an angle is the ratio of the sine and cosine. Values are returned in the range infinity to -infinity.
   
Syntax  
tan(angle)
   
Parameters  
angle   float: an angle measured in radians

   
Returns   float
   
Usage   Web & Application
   
Related   atan2()
cos()
sin()
radians()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas