Explicitly use std::sqrt to avoid triggering ambiguous call errors when sqrt is defined in other namespaces

This commit is contained in:
Mkr 2018-08-14 22:24:15 -07:00
parent 445a36ef31
commit fa1917a782

View File

@ -188,7 +188,7 @@ inline void Vector2::setAllValues(decimal newX, decimal newY) {
// Return the length of the vector
inline decimal Vector2::length() const {
return sqrt(x*x + y*y);
return std::sqrt(x*x + y*y);
}
// Return the square of the length of the vector