diff options
author | Aki <please@ignore.pl> | 2022-05-20 19:51:40 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-05-20 19:53:46 +0200 |
commit | d3720f01837e949ce7e7ea9b119358a5bb7b9666 (patch) | |
tree | c063f0f55d4cc58df23dc50d9b141a9237753c91 /Utils-inl.h | |
parent | 21341f788654cfc806778fa34d09885431083d76 (diff) | |
download | derelict-d3720f01837e949ce7e7ea9b119358a5bb7b9666.zip derelict-d3720f01837e949ce7e7ea9b119358a5bb7b9666.tar.gz derelict-d3720f01837e949ce7e7ea9b119358a5bb7b9666.tar.bz2 |
Merged distance calculation functions
Diffstat (limited to 'Utils-inl.h')
-rw-r--r-- | Utils-inl.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Utils-inl.h b/Utils-inl.h deleted file mode 100644 index 01e0ca6..0000000 --- a/Utils-inl.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include <cmath> - - -template <typename V, typename T> -T -dist2(const V& lhs, const V& rhs) -{ - return std::sqrt( - std::pow(lhs.x - rhs.x, 2) + - std::pow(lhs.y - rhs.y, 2)); -} - - -template <typename V, typename T> -T -dist3(const V& lhs, const V& rhs) -{ - return std::sqrt( - std::pow(lhs.x - rhs.x, 2) + - std::pow(lhs.y - rhs.y, 2) + - std::pow(lhs.z - rhs.z, 2)); -} |