summaryrefslogtreecommitdiffstats
path: root/src/math/intpoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/intpoint.h')
-rw-r--r--src/math/intpoint.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/math/intpoint.h b/src/math/intpoint.h
index ebd9c5e..010b0fb 100644
--- a/src/math/intpoint.h
+++ b/src/math/intpoint.h
@@ -21,6 +21,7 @@
#pragma once
+#include <cmath>
// Math module namespace
namespace Math {
@@ -49,6 +50,11 @@ struct IntPoint
{
return !operator==(p);
}
+
+ inline float Length() const
+ {
+ return sqrtf(x*x + y*y);
+ }
};