Fixed stupid shit

This commit is contained in:
h3cx committed 2026-09-29 22:18:36 +02:00
1 parent 2823d3e0c0
commit ce1a59f3d5
2 files changed
+10 -54

No files matched your search

+4 -3
View File
@@ -1,11 +1,9 @@
#ifndef VEC_UTIL_H_
#define VEC_UTIL_H_
#include <raylib.h>
#include <math.h>
#include <raylib.h>
static const Vector2 NULL_VEC2 = {0, 0};
Vector2 transform_to_center(Vector2 v) {
int width = GetRenderWidth();
int height = GetRenderHeight();
@@ -26,6 +24,9 @@ float vec2_len(Vector2 v) { return sqrtf(v.x * v.x + v.y * v.y); }
Vector2 vec2_normalize(const Vector2 v) {
float len = vec2_len(v);
if (len == 0) {
return NULL_VEC2;
}
Vector2 result = {v.x / len, v.y / len};
return result;
}