summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/intpoint.h6
-rw-r--r--src/math/test/CMakeLists.txt1
2 files changed, 6 insertions, 1 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);
+ }
};
diff --git a/src/math/test/CMakeLists.txt b/src/math/test/CMakeLists.txt
index dae4018..e31260c 100644
--- a/src/math/test/CMakeLists.txt
+++ b/src/math/test/CMakeLists.txt
@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 2.8)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE debug)
endif(NOT CMAKE_BUILD_TYPE)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wold-style-cast -std=gnu++0x")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
include_directories(