summaryrefslogtreecommitdiff
path: root/my_math.h
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-08-10 21:24:03 -0400
committerFox Caminiti <fox@foxcam.net>2022-08-10 21:24:03 -0400
commitbc5375149c0ecb416848a2d3657ea41ae97177b3 (patch)
tree8868395241d523bb96ea90d2846cd6ffefcae766 /my_math.h
parentf1e12e108869c560d92eb8803e4b5104c7d8f85d (diff)
path rasterization started with opengl
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;