1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
-
-
- #ifndef _MATH_MATH_H
- #define _MATH_MATH_H
-
- #ifndef M_PI
- #define OR_PI (3.14159265358979323846f)
- #else
- #define OR_PI ((float)M_PI)
- #endif
-
- #define OR_RAD_TO_DEG(x) ((x) * (180.0f / OR_PI))
- #define OR_DEG_TO_RAD(x) ((x) * (OR_PI / 180.0f))
-
-
- bool equalEpsilon(float a, float b);
-
-
- int intersectionLinePolygon(float intersect[3], float p1[3], float p2[3], float polygon[3][3]);
-
-
- float distance(const float a[3], const float b[3]);
-
-
- void midpoint(const float a[3], const float b[3], float mid[3]);
-
-
- float randomNum(float from, float to);
-
- #endif
|