macro definition

Hello forum

I have defined a macro as follows:

 
  #define TWOPI_F 6.2831853f 


And while using the above macro in the following manner, I am getting an error:

1
2
3
4
    mAngle += 0.01f;

    if(angle > TWOPI_F)
        mAngle -= TWOPI_F;


The error info is:

1
2
3
/home/sajjad/Documents/Qt/QtOpenGL/PerFragment/common/defines.h:25: error: invalid operands of types '<unresolved overloaded function type>' and 'float' to binary 'operator>'
 #define TWOPI_F 6.2831853f
                 ^


Any hint on this. I am not getting it.

Thanks
What type is angle? Has it been declared properly?
Thanks for the hint. It was not declared properly.
Topic archived. No new replies allowed.