On Sun, 5 Feb 2023 13:52:23 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/Math.java line 2297:
>> 
>>> 2295:      */
>>> 2296:     public static float clamp(float value, float min, float max) {
>>> 2297:         if (!(min < max)) {
>> 
>> Wouldn't it be more simple to replace `!(min < max)` with `min >= max`?
>
> No. I want NaNs to go into this branch

@amaembo Should that be `if (!(min <= max))` instead?

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

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

Reply via email to