Index: src/conversions.h |
diff --git a/src/conversions.h b/src/conversions.h |
index a23ea90fb125e14c925f5ca6cc79a731b02f8cbc..0c76574ab1480d9ee600ec601706b145f1af8a23 100644 |
--- a/src/conversions.h |
+++ b/src/conversions.h |
@@ -41,7 +41,8 @@ inline bool isBinaryDigit(int x) { |
// The fast double-to-(unsigned-)int conversion routine does not guarantee |
// rounding towards zero. |
-// For NaN and values outside the int range, return INT_MIN or INT_MAX. |
+// If x is NaN, the result is INT_MIN. Otherwise the result is the argument x, |
+// clamped to [INT_MIN, INT_MAX] and then rounded to an integer. |
inline int FastD2IChecked(double x) { |
if (!(x >= INT_MIN)) return INT_MIN; // Negation to catch NaNs. |
if (x > INT_MAX) return INT_MAX; |