forked from UCMHSProgramming2015/FunctionsChallenge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcirclearea
More file actions
35 lines (20 loc) · 640 Bytes
/
Copy pathcirclearea
File metadata and controls
35 lines (20 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Name: circlearea()
float area;
void setup(){
size(500,500);
background(255);
area = circlearea(5);
}
void draw(){
rect(width/2,height/2, area, area);
}
## Description:
By using this function any area of any circle, given a radius can be found. The parameter needed for this function is the radius. The radius is the distance from the center of the circle to any edge on the outside of the circle
## Syntax:
circlearea(radius)
##Parameters:
radius int or float the value of the radius
##Returns:
Returns the values of the area in meters^2
##Other notes:
if the radius is given in another unit it is just that unit squared