On Tue, 7 Feb 2023 00:57:54 GMT, Joe Darcy <da...@openjdk.org> wrote:

>> Tagir F. Valeev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Added explanatory comments
>
> src/java.base/share/classes/java/lang/Math.java line 2266:
> 
>> 2264:         // If min == max, we should additionally check for +0.0/-0.0 
>> case,
>> 2265:         // so we're still visiting the if statement.
>> 2266:         if (!(min < max)) {
> 
> A suggestion for an additional comment on this line like:
> 
> // min greater than, equal to, or unordered with respect to max; NaN values 
> are unorded

Added, thanks!

> test/jdk/java/lang/Math/Clamp.java line 47:
> 
>> 45:     private static int testIntClamp() {
>> 46:         int failures = 0;
>> 47:         failures += checkIntClamp(0, 1, 2, 1);
> 
> Possible refactoring here: represent the test cases in, say, a 2D int array 
> or an array/list of records and loop over them.

Updated. Is it better this way?

-------------

PR: https://git.openjdk.org/jdk/pull/12428

Reply via email to