summaryrefslogtreecommitdiff
path: root/my_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'my_math.h')
-rw-r--r--my_math.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/my_math.h b/my_math.h
index b95e71d..cf491f1 100644
--- a/my_math.h
+++ b/my_math.h
@@ -46,6 +46,16 @@ inline v2 V2(real32 x, real32 y)
return(Result);
}
+inline v2 V2(real32 x)
+{
+ v2 Result;
+
+ Result.x = x;
+ Result.y = x;
+
+ return(Result);
+}
+
inline v2 V2(ImVec2 A)
{
v2 Result;
@@ -186,6 +196,18 @@ v2i operator+(v2i A, v2i B)
return(Result);
}
+v2 operator/(v2 A, real32 B)
+{
+ v2 Result;
+
+ Result.x = A.x / B;
+ Result.y = A.y / B;
+
+ return Result;
+}
+
+
+
v4 operator+(v4 A, v4 B)
{
v4 Result;