[Fix] Correcting vector values.
This commit is contained in:
parent
a7546372cc
commit
05e83fdcd6
@ -16,7 +16,7 @@ CTTF = `freetype-config --cflags`
|
|||||||
CGL =
|
CGL =
|
||||||
CFLAGS = -Wall $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION)
|
CFLAGS = -Wall $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION)
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
CFLAGS += -g3 -DDEBUG
|
CFLAGS += -g3 -DDEBUG -DLUA_USE_APICHECK
|
||||||
else
|
else
|
||||||
CFLAGS += -O2
|
CFLAGS += -O2
|
||||||
endif
|
endif
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
|
||||||
#define VX(v) ((v).mod*cos((v).angle))
|
#define VX(v) ((v).x)
|
||||||
#define VY(v) ((v).mod*sin((v).angle))
|
#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)
|
||||||
|
|
||||||
@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
// Base of 2D vectors.
|
// Base of 2D vectors.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
double mod, angle; // Basic 2D vector components.
|
double x, y; // Cartesian values.
|
||||||
|
double mod, angle; // Polar values.
|
||||||
} Vec2;
|
} Vec2;
|
||||||
|
|
||||||
// Vector manupulation.
|
// Vector manupulation.
|
||||||
|
Loading…
Reference in New Issue
Block a user