summaryrefslogtreecommitdiff
path: root/source/math.h
diff options
context:
space:
mode:
authortalha <sarcxd@gmail.com>2024-10-25 23:22:42 +0500
committertalha <sarcxd@gmail.com>2024-10-25 23:22:42 +0500
commit1f4aa60399ee7b0f0d4cd8c78066c54c25cf2a15 (patch)
tree53b45f27bbaab36bc42e51cd9326cefeef772757 /source/math.h
parent240ff459154f309b9b82b9c24fc4def184d359a3 (diff)
Setup a basic camera mover
The camera now changes view after player moves beyond 80% of the screen up or right AND beyond 20% of the screen left or bottom.
Diffstat (limited to 'source/math.h')
-rwxr-xr-xsource/math.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/math.h b/source/math.h
index 3ecf6fb..d682ae3 100755
--- a/source/math.h
+++ b/source/math.h
@@ -90,6 +90,10 @@ union Vec3 {
r32 z;
};
r32 data[3];
+
+ Vec2 v2() {
+ return Vec2{x, y};
+ }
};
typedef Vec3 RGB;