[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master ade66891: Improve documentation
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master ade66891: Improve documentation |
Date: |
Wed, 22 Jun 2022 07:34:17 -0400 (EDT) |
branch: master
commit ade668919aa6023b0e62e540958905d89f94907c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve documentation
Formerly, 'u' in the comment block for u_abs() meant the return value,
conflicting with the intermediate value 'u' in the implementation.
Changed 'u' to 'r' in the comment block to prevent confusion.
---
math_functions.hpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/math_functions.hpp b/math_functions.hpp
index 56ade0eb..5ed7260a 100644
--- a/math_functions.hpp
+++ b/math_functions.hpp
@@ -177,11 +177,11 @@ T signum(T t)
/// UINT_MAX == INT_MAX == -(INT_MIN+1)
/// case that Daniel Fischer points out somewhere on the web.
///
-/// Postconditions: for u = u_abs(t),
-/// - u is of an unsigned type
-/// - sizeof u == sizeof t
+/// Postconditions: for r = u_abs(t),
+/// - r is of an unsigned type
+/// - sizeof r == sizeof t
/// and, if t is negative, then
-/// - 0 == t + u == u + t [for t < 0; incidentally, also for 0 == t]
+/// - 0 == t + r == r + t [for t < 0; incidentally, also for 0 == t]
///
/// If the cast on the last line is removed, then unary '-' performs
/// integral promotion on its operand and returns a result of the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master ade66891: Improve documentation,
Greg Chicares <=