title: (float) in c / c++
body: <p>Trying to find out what the (float) in this function means:</p>
  
  <pre><code>static float avgEndpoints (int i, int stride, float *fa)
  {
      return ((float) (fa[i-stride] +
                   fa[i+stride]) * .5f);
  }
  </code></pre>
  
  <p>The reason I'm confused is the function already returns floating point (or appears to), so what is the (float) doing there? </p>
  
  <p>I'm attempting to port this program to another language and learn a bit of c/c++ at the same time.</p>
  
  <p>Thanks</p>