From 9aee576b99e38f05cc2e3af804650484358fe3b8 Mon Sep 17 00:00:00 2001 From: Vazquinhos Date: Fri, 13 May 2016 12:37:24 +0200 Subject: [PATCH] Added dependencies to cmath in order to use sqrt --- tiny_obj_loader.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tiny_obj_loader.h b/tiny_obj_loader.h index 5127a2e..f63ff02 100644 --- a/tiny_obj_loader.h +++ b/tiny_obj_loader.h @@ -44,6 +44,7 @@ #include #include #include +#include namespace tinyobj { @@ -138,9 +139,9 @@ public: void normalize() { - const float length = sqrt( ( coord[0] * coord[0] ) + - ( coord[1] * coord[1] ) + - ( coord[2] * coord[2] ) ); + const float length = std::sqrt( ( coord[0] * coord[0] ) + + ( coord[1] * coord[1] ) + + ( coord[2] * coord[2] ) ); if( length != 1 ) { coord[0] = (coord[0] / length);