summaryrefslogtreecommitdiff
path: root/src/include/my_math.h
diff options
context:
space:
mode:
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)
{