Merge pull request #142 from Rackover/better_r_draw_debug

Better r draw debug
This commit is contained in:
Louve
2021-12-17 18:02:42 +01:00
committed by GitHub
6 changed files with 378 additions and 228 deletions

View File

@ -149,4 +149,15 @@ namespace Utils
{
return !(base1 + len1 <= base2 || base2 + len2 <= base1);
}
float Vec3SqrDistance(const float v1[3], const float v2[3])
{
auto x = v2[0] - v1[0];
auto y = v2[1] - v1[1];
auto z = v2[2] - v1[2];
return x * x + y * y + z * z;
}
}

View File

@ -24,6 +24,7 @@ namespace Utils
void OpenUrl(const std::string& url);
bool HasIntercection(unsigned int base1, unsigned int len1, unsigned int base2, unsigned int len2);
float Vec3SqrDistance(const float v1[3], const float v2[3]);
template <typename T> inline void RotLeft(T& object, size_t bits)
{