aboutsummaryrefslogtreecommitdiff
path: root/libcgh.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-12 02:59:55 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-12 02:59:55 +0000
commit30531dfb996a1c4b7c1975c7f234bec359b36668 (patch)
treed5fd391a7f035c100a9cff278a7cb8fe40311e38 /libcgh.h
parentf4832349efdf06d8a1a410c636045f505efb52f1 (diff)
downloadbullet-lab-remix-30531dfb996a1c4b7c1975c7f234bec359b36668.tar.xz
Modify ClearRange for level "hyper-threading".
Diffstat (limited to 'libcgh.h')
-rw-r--r--libcgh.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcgh.h b/libcgh.h
index 1ca7d4a..5369bd8 100644
--- a/libcgh.h
+++ b/libcgh.h
@@ -2,7 +2,7 @@
//Chrisoft Game Helper header
//Copyright Chrisoft 2014
//libcgh version 0007
-//Last full compatible version 0002
+//Last full compatible version 0007
//^Modify that when big change is made^
#include <hge.h>
#include <hgefont.h>
@@ -52,13 +52,13 @@ struct vector2d
inline vector2d ToUnitCircle(vector2d input)
{
vector2d res=input;
- res.x=res.x/sqrt(sqr(input.x)+sqr(input.y));
- res.y=res.y/sqrt(sqr(input.x)+sqr(input.y));
+ res.x=res.x/input.l();
+ res.y=res.y/input.l();
return res;
}
inline double GetDist(const vector2d a,const vector2d b)
{
- return sqrtf((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
+ return sqrt(sqr(a.x-b.x)+sqr(a.y-b.y));
}
inline double GetDistSeg(const vector2d a,const vector2d b,const vector2d c)
{