From 582afbd617bed5924277b0d1f192b9bb343b9850 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Mon, 26 Aug 2013 16:44:00 +0100 Subject: [PATCH] [Change] Using atan2 instead of atan. --- src/physics.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/physics.h b/src/physics.h index b00056d..7e89674 100644 --- a/src/physics.h +++ b/src/physics.h @@ -2,13 +2,13 @@ #include <math.h> -#define VX(v) ((v).x) -#define VY(v) ((v).y) -#define VMOD(v) ((v).mod) -#define VANGLE(v) ((v).angle) +#define VX(v) ((v).x) +#define VY(v) ((v).y) +#define VMOD(v) ((v).mod) +#define VANGLE(v) ((v).angle) -#define MOD(x,y) (sqrt((x)*(x) + (y)*(y))) -#define ANGLE(x,y)(((x)==0.) ? 0. : atan2(y,x)) +#define MOD(x,y) (sqrt((x)*(x) + (y)*(y))) +#define ANGLE(x,y) (((x)==0.) ? 0. : atan2(y,x)) #define vect_dist(v,u) MOD((v)->x-(u)->x, (v)->y-(u)->y) #define vect_odist(v) MOD((v)->x, (v)->y)