diff options
author | 2013-01-15 16:15:48 +0900 | |
---|---|---|
committer | 2013-01-15 16:41:10 +0900 | |
commit | 6cee61deebd0ca2b85054ccc239523d1e5fdfab1 (patch) | |
tree | 3acf4a8f46006033b3dfb32adf209e87e37cb806 /native/jni/src/geometry_utils.h | |
parent | c995dbcf598730f138e59f989e813b83d585d40b (diff) | |
download | latinime-6cee61deebd0ca2b85054ccc239523d1e5fdfab1.tar.gz latinime-6cee61deebd0ca2b85054ccc239523d1e5fdfab1.tar.xz latinime-6cee61deebd0ca2b85054ccc239523d1e5fdfab1.zip |
Use -fno-inline for debug builds & small cleanups
Change-Id: I24f91d7130f2203715b868d4a82510660939886f
Diffstat (limited to 'native/jni/src/geometry_utils.h')
-rw-r--r-- | native/jni/src/geometry_utils.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/native/jni/src/geometry_utils.h b/native/jni/src/geometry_utils.h index 4060a7bd3..4bff80f15 100644 --- a/native/jni/src/geometry_utils.h +++ b/native/jni/src/geometry_utils.h @@ -21,8 +21,6 @@ #include "defines.h" -#define DEBUG_DECODER false - #define M_PI_F 3.14159265f #define ROUND_FLOAT_10000(f) ((f) < 1000.0f && (f) > 0.001f) \ ? (floorf((f) * 10000.0f) / 10000.0f) : (f) @@ -36,19 +34,8 @@ static inline float getSquaredDistanceFloat(const float x1, const float y1, cons return SQUARE_FLOAT(x1 - x2) + SQUARE_FLOAT(y1 - y2); } -static inline float getNormalizedSquaredDistanceFloat(const float x1, const float y1, - const float x2, const float y2, const float scale) { - return getSquaredDistanceFloat(x1, y1, x2, y2) / SQUARE_FLOAT(scale); -} - -static inline float getDistanceFloat(const float x1, const float y1, const float x2, - const float y2) { - return hypotf(x1 - x2, y1 - y2); -} - static AK_FORCE_INLINE int getDistanceInt(const int x1, const int y1, const int x2, const int y2) { - return static_cast<int>(getDistanceFloat(static_cast<float>(x1), static_cast<float>(y1), - static_cast<float>(x2), static_cast<float>(y2))); + return static_cast<int>(hypotf(static_cast<float>(x1 - x2), static_cast<float>(y1 - y2))); } static AK_FORCE_INLINE float getAngle(const int x1, const int y1, const int x2, const int y2) { |