[Change] Using atan2 instead of atan.
This commit is contained in:
parent
014ba77361
commit
582afbd617
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#define VX(v) ((v).x)
|
#define VX(v) ((v).x)
|
||||||
#define VY(v) ((v).y)
|
#define VY(v) ((v).y)
|
||||||
#define VMOD(v) ((v).mod)
|
#define VMOD(v) ((v).mod)
|
||||||
#define VANGLE(v) ((v).angle)
|
#define VANGLE(v) ((v).angle)
|
||||||
|
|
||||||
#define MOD(x,y) (sqrt((x)*(x) + (y)*(y)))
|
#define MOD(x,y) (sqrt((x)*(x) + (y)*(y)))
|
||||||
#define ANGLE(x,y)(((x)==0.) ? 0. : atan2(y,x))
|
#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_dist(v,u) MOD((v)->x-(u)->x, (v)->y-(u)->y)
|
||||||
#define vect_odist(v) MOD((v)->x, (v)->y)
|
#define vect_odist(v) MOD((v)->x, (v)->y)
|
||||||
|
Loading…
Reference in New Issue
Block a user