2011-06-23 16:07:45 +00:00
|
|
|
/* Some handy mathematics utilities
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MATHUTILS_H_
|
|
|
|
#define _MATHUTILS_H_
|
|
|
|
|
|
|
|
class MathUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// returns the cartesian distance of two points
|
|
|
|
static float distance(float x1, float y1, float x2, float y2);
|
2011-06-23 17:54:28 +00:00
|
|
|
|
|
|
|
static bool lines_intersect(int x1, int y1, int x2, int y2,
|
|
|
|
int x3, int y3, int x4, int y4);
|
2011-06-23 16:07:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|