From 3c3c628b617dc53f0b7b59285c7d67888074c33d Mon Sep 17 00:00:00 2001 From: sicarius Date: Sun, 18 Feb 2007 00:14:00 +0000 Subject: +++ Additional Codework --- source/Concept/Framework/tools.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/Concept/Framework/tools.h') diff --git a/source/Concept/Framework/tools.h b/source/Concept/Framework/tools.h index 6519a1b..0ca4dda 100644 --- a/source/Concept/Framework/tools.h +++ b/source/Concept/Framework/tools.h @@ -1,7 +1,8 @@ #ifndef _TOOLS_H #define _TOOLS_H -#include +#include +#include #ifndef new void* operator new(size_t sz); @@ -34,6 +35,11 @@ inline void usleep(int usec) asm volatile("nop"); } } -}; +}; + +inline float distance2d(float x1, float y1, float x2, float y2) +{ + return sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))); +} #endif -- cgit v1.2.3