[Fix] Correcting vector values.

This commit is contained in:
Allanis 2013-02-02 23:19:01 +00:00
parent a7546372cc
commit 05e83fdcd6
2 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,7 @@ CTTF = `freetype-config --cflags`
CGL =
CFLAGS = -Wall $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION)
ifdef DEBUG
CFLAGS += -g3 -DDEBUG
CFLAGS += -g3 -DDEBUG -DLUA_USE_APICHECK
else
CFLAGS += -O2
endif

View File

@ -1,8 +1,8 @@
#pragma once
#include "def.h"
#define VX(v) ((v).mod*cos((v).angle))
#define VY(v) ((v).mod*sin((v).angle))
#define VX(v) ((v).x)
#define VY(v) ((v).y)
#define VMOD(v) ((v).mod)
#define VANGLE(v) ((v).angle)
@ -11,7 +11,8 @@
// Base of 2D vectors.
typedef struct {
double mod, angle; // Basic 2D vector components.
double x, y; // Cartesian values.
double mod, angle; // Polar values.
} Vec2;
// Vector manupulation.