feat: Added basic shooting

This commit is contained in:
2025-10-05 22:35:34 +01:00
parent 3eb8683ce3
commit 319bb441ed
10 changed files with 39 additions and 13 deletions

View File

@@ -222,3 +222,12 @@ F32 Random_Bilateral(Random *rnd) {
F32 result = -1.0f + (2.0f * Random_Unilateral(rnd));
return result;
}
V2f V2f_Clip(V2f screen_xy, V2f screen_size) {
V2f result;
result.x = ((screen_xy.x / screen_size.w) * 2.0f) - 1.0f;
result.y = ((screen_xy.y / screen_size.h) * 2.0f) - 1.0f;
return result;
}

View File

@@ -147,4 +147,6 @@ function U32 Random_U32(Random *rnd, U32 min, U32 max);
function F32 Random_Unilateral(Random *rnd);
function F32 Random_Bilateral(Random *rnd);
V2f V2f_Clip(V2f screen_xy, V2f screen_size);
#endif // LD_CORE_MATH_H_