title: Processing function and parameters
body: <p>I am having trouble coming up with a program that draws a ball on the screen using a function including values in the parameter and then making it move across at a constant speed. As you can tell I am a noob and don't quite understand parameters.
  Here is what I have so far.</p>
  
  <pre><code>float BallXLoc;
  float BallYLoc;
  
  float ballDiam = 40;
  float ballRadius = 40;
  float xSpeed = 1;
  
  void setup() {
  size(400, 400);
  }
  
  void draw() {
    drawBall(BallXLoc, BallYLoc);
    BallXLoc = BallXLoc + xSpeed;
  }
  
  void drawBall(float xPos, float yPos) {
    ellipse(200, 200, ballDiam, ballRadius);
  }
  </code></pre>