From 30531dfb996a1c4b7c1975c7f234bec359b36668 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Wed, 12 Mar 2014 02:59:55 +0000 Subject: Modify ClearRange for level "hyper-threading". --- libcgh.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libcgh.h') 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 #include @@ -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) { -- cgit v1.2.3