Get int now works on enum dvars

This commit is contained in:
Louvenarde
2021-11-11 16:44:54 +01:00
parent 892f521728
commit 6d70cd3e74
3 changed files with 20 additions and 10 deletions

View File

@ -152,7 +152,11 @@ namespace Utils
float Vec3SqrDistance(float(*v1)[3], float(*v2)[3])
{
return static_cast<float>(std::pow((*v2)[0] - (*v1)[0], 2) + std::pow((*v2)[1] - (*v1)[1], 2) + std::pow((*v2)[2] - (*v1)[2], 2));
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;
}