I have a simple recursive function that calculates a simple pendulum swing decay, using the ratio of height1:height2 of 0.98.

The function has a base case of 0.0, but for some reason it turns into infinite self-calls!

Can anyone spot what I'm missing?

Code:

```
float swingDecay (float value) {

     if ( value == 0.00 ) {
          return value;
     }

     else { 
          return swingDecay (value * 0.98);  }     
}

```

mIL3S
www.milkdrinkingcow.com