Skip to content

Instantly share code, notes, and snippets.

@slambert
Created September 27, 2016 21:09
Show Gist options
  • Save slambert/6e7823d776af60d87f322803869e50d8 to your computer and use it in GitHub Desktop.
Save slambert/6e7823d776af60d87f322803869e50d8 to your computer and use it in GitHub Desktop.
We can get information out of a function too. Not sure this is the clearest example, but you can re-write it.
float double7;
void setup() {
size(512, 512);
}
void draw(){
double7 = double7er(mouseX);
println("double7: " + double7);
// double7 = (mouseX * 2) + 7;
// println("double7: " + double7);
}
float double7er(float inputnumber){
return (inputnumber * 2) + 7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment