Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Circle.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Name: circle

## Examples:
Insert examples here.

## Description:
Draws a circle using the standard equation of a circle

## Syntax:
float circle(h,k,r,x,y){}

##Parameters:
h- the x coordinate of the center of the circle
k- the y coordinate of the center of the circle
r- the radius of the circle
x- the x position on the canvas
y- the y position on the canvas

##Returns:
float

##Other notes:
the fill color also changes everytime the mouse is pressed
19 changes: 0 additions & 19 deletions Documentation1.md

This file was deleted.

19 changes: 0 additions & 19 deletions Documentation2.md

This file was deleted.

19 changes: 0 additions & 19 deletions Documentation3.md

This file was deleted.

19 changes: 19 additions & 0 deletions LikeASir.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Name: likeASir

## Examples:
?

## Description:
Draws an image on to the canas of a very elegant man

## Syntax:
void likeASir(){}

##Parameters:
N/A- There are no parameters in this function

##Returns:
void

##Other notes:
The man is very elegant
33 changes: 33 additions & 0 deletions ReturningValues/ReturningValues.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
void setup(){
size(800,600);
background(0);
noStroke();
}


void draw(){
println( work(3,5));
println( circle(400,300,5,78,91));
likeASir();
}

float work(float k, float x){
float answer;
answer=.5*k*sq(x);
return answer;
}

float circle(float h, float k, float r, float x, float y){
r=sqrt(sq(x-h)+sq(y-k));
ellipse(h,k,r*2,r*2);
if (mousePressed){
fill(random(255),random(255),random(255));
}
return r;
}

void likeASir(){
PImage las = loadImage("like_a_sir.png");
image(las,400,300,733,800);
imageMode(CENTER);
}
Binary file added ReturningValues/data/like_a_sir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Work.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Name: Work

## Examples:


## Description:
Work is force put on an object times the distance the object goes.

## Syntax:
float Work(f,d){}

##Parameters:
f- Force= the amount of energy put into an object to make it move
d- Distance= the distance an object is taken by the force

##Returns:
float