From b56bd9374cba08c2fa429a0eb8534488134c91d6 Mon Sep 17 00:00:00 2001 From: talha Date: Wed, 12 Feb 2025 01:10:34 +0500 Subject: Improved level design tooling, Added ui camera --- source/math.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/math.h') diff --git a/source/math.h b/source/math.h index b189c89..da7744b 100755 --- a/source/math.h +++ b/source/math.h @@ -51,12 +51,12 @@ u32 clampi(u32 x, u32 bottom, u32 top) // ==== Vector Math ==== union IVec2 { struct { - u32 x; - u32 y; + s32 x; + s32 y; }; - u32 data[2]; + s32 data[2]; - IVec2 operator+(u32 scaler) { + IVec2 operator+(s32 scaler) { IVec2 res; res.x = this->x + scaler; res.y = this->y + scaler; @@ -72,7 +72,7 @@ union IVec2 { return res; } - IVec2 operator-(u32 scaler) { + IVec2 operator-(s32 scaler) { IVec2 res; res.x = this->x - scaler; res.y = this->y - scaler; @@ -88,7 +88,7 @@ union IVec2 { return res; } - IVec2 operator*(u32 scaler) { + IVec2 operator*(s32 scaler) { IVec2 res; res.x = this->x * scaler; res.y = this->y * scaler; @@ -104,7 +104,7 @@ union IVec2 { return res; } - IVec2 operator/(u32 scaler) { + IVec2 operator/(s32 scaler) { SDL_assert(scaler != 0); IVec2 res; res.x = this->x / scaler; -- cgit v1.2.3