Browse Source

Added missing assert for sqrt

Christophe Riccio 12 years ago
parent
commit
d3b8b25dd4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      glm/core/func_exponential.inl

+ 2 - 0
glm/core/func_exponential.inl

@@ -146,6 +146,8 @@ namespace detail
 			std::numeric_limits<genType>::is_iec559,
 			"'sqrt' only accept floating-point inputs");
 
+		assert(x >= genType(0));
+
 		return std::sqrt(x);
 	}