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  

HALF_PI (1.57079...)

   
Examples  
float f = 0.0; 
beginShape(POLYGON); 
while(f < HALF_PI) { 
  vertex(width/2 + cos(f)*40, height/2 + sin(f)*40); 
  f += PI/12.0; 
} 
endShape(); 
Description   HALF_PI is a mathematical constant with the value 1.57079632679489661923. It is half the ratio of the circumference of a circle to its diameter. It is useful in combination with the trigonometric functions sin() and cos().
   
Syntax  
HALF_PI
   
Usage   Web & Application
   
Related   PI
TWO_PI
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas