summaryrefslogtreecommitdiff
path: root/src/include/my_math.h
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2023-01-20 10:10:54 -0500
committerFox Caminiti <fox@foxcam.net>2023-01-20 10:10:54 -0500
commit2f164ae23bcd8a857081529189b484a1515f2834 (patch)
treec7f5b163f7e1585a8fbdb3b8fb7fb012761ae239 /src/include/my_math.h
parent1d0d8549411e23394059f420f053cc3ee28dacfb (diff)
youarelazy
Diffstat (limited to 'src/include/my_math.h')
-rw-r--r--src/include/my_math.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/include/my_math.h b/src/include/my_math.h
index 72c6b99..2a54f4d 100644
--- a/src/include/my_math.h
+++ b/src/include/my_math.h
@@ -361,16 +361,6 @@ v2i operator-(v2i A, int16 B)
return(Result);
}
-v2i operator+(v2i A, int16 B)
-{
- v2i Result;
-
- Result.x = A.x + B;
- Result.y = A.y + B;
-
- return(Result);
-}
-
v2 operator*(real32 A, v2 B)
{
v2 Result;
@@ -580,6 +570,12 @@ LengthSq(v2 A)
return Result;
}
+inline real32
+Length(v2 A)
+{
+ return sqrt(Inner(A, A));
+}
+
inline uint32
Floor(uint32 A, uint32 B)
{