[Fix] Correcting vector values.
This commit is contained in:
parent
a7546372cc
commit
05e83fdcd6
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user