From fa1917a782e1bda9461174a6a368120caf0cafa0 Mon Sep 17 00:00:00 2001 From: Mkr Date: Tue, 14 Aug 2018 22:24:15 -0700 Subject: [PATCH] Explicitly use std::sqrt to avoid triggering ambiguous call errors when sqrt is defined in other namespaces --- src/mathematics/Vector2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mathematics/Vector2.h b/src/mathematics/Vector2.h index 70ec3cfe..b026ec83 100644 --- a/src/mathematics/Vector2.h +++ b/src/mathematics/Vector2.h @@ -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