Reference for Processing version 1.2. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name

HALF_PI (1.57079...)

Examples
example pic
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().
Usage Web & Application
Related PI
TWO_PI
QUARTER_PI
Updated on June 14, 2010 12:05:29pm EDT

Creative Commons License