Reference×
Reference
- [] (array access)
- = (assign)
- catch
- class
- , (comma)
- // (comment)
- {} (curly braces)
- /** */ (doc comment)
- . (dot)
- draw()
- exit()
- extends
- false
- final
- implements
- import
- loop()
- /* */ (multiline comment)
- new
- noLoop()
- null
- () (parentheses)
- popStyle()
- pop()
- private
- public
- pushStyle()
- push()
- redraw()
- return
- ; (semicolon)
- setLocation()
- setResizable()
- setTitle()
- setup()
- static
- super
- this
- thread()
- true
- try
- void
Name
PI
Description
PI is a mathematical constant with the value 3.1415927. It is the ratio of the circumference of a circle to its diameter. It is useful in combination with the trigonometric functions sin() and cos().
Examples
size(400, 400); float x = width/2; float y = height/2; float d = width * 0.8; arc(x, y, d, d, 0, QUARTER_PI); arc(x, y, d-80, d-80, 0, HALF_PI); arc(x, y, d-160, d-160, 0, PI); arc(x, y, d-240, d-240, 0, TWO_PI);

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.