# Leap Motion LeapMath.h conflicts with ofConstants.h

Hi, I’m trying to get leap motion working with of but when I compile I have some errors.
LeapMath.h defines some constants that cause conflicts with openframeworks macro defined in ofConstants.h
Here are the three constants that give me trouble.
Does anybody has a solution?
Tx
Gabriele

``````

/** The constant pi as a single precision floating point number. */
static const float PI          = 3.1415926536f;
/**
* The constant ratio to convert an angle measure from degrees to radians.
* Multiply a value in degrees by this constant to convert to radians.
*/
static const float DEG_TO_RAD  = 0.0174532925f;
/**
* The constant ratio to convert an angle measure from radians to degrees.
* Multiply a value in radians by this constant to convert to degrees.
*/
static const float RAD_TO_DEG  = 57.295779513f;

``````

I solved sorrounding the code quoted above with:

``````

#ifndef PI

........

#endif

``````

Hey there. I tried it, but now there is a new static defined `EPSILON`.
I tried to enclose EPSILON aswell, but the following error occurs:

from src/ofApp.h:4,
from src/main.cpp:2:
…/…/…/addons/ofxLeapMotion2/libs/include/LeapMath.h: In Elementfunktion »float Leap::Vector::angleTo(const Leap::Vector&) const«:
…/…/…/addons/ofxLeapMotion2/libs/include/LeapMath.h:256:18: Fehler: »EPSILON« wurde in diesem Gültigkeitsbereich nicht definiert
if (denom <= EPSILON) {
^
…/…/…/addons/ofxLeapMotion2/libs/include/LeapMath.h: In Elementfunktion »Leap::Vector Leap::Vector::normalized() const«:
…/…/…/addons/ofxLeapMotion2/libs/include/LeapMath.h:387:18: Fehler: »EPSILON« wurde in diesem Gültigkeitsbereich nicht definiert
if (denom <= EPSILON) {

Then I tried to just enclose all but EPSILON, like you originally had. It gives this error:

src/ofApp.cpp:1:0: Fehler: unclosed//unreturned #ifndef
#ifndef PI

(My error output was in german, I had to translate “unbeendet” to unclosed.)

Have you got any idea what I can do to fix the problem?

Dude you saved my live, this was driving me crazy. Thanks a million, I really apreciate you coming back with the workarraund