On Tue, 21 Feb 2023 20:39:53 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:

>> For cleanup and dogfooding the new method, it would be nice to use 
>> Math.clamp where possible in java.base. See PR #12428.
>> 
>> As Math.clamp performs an additional check that min is not greater than max, 
>> I conservatively replaced only those occurrences where I can see that this 
>> invariant is always held. There are more occurrences, where clamp can be 
>> potentially used but it's unclear whether min <= max is always true.
>
> Tagir F. Valeev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update copyright year

On second thought, maybe not; Math.clamp might actually look more clumsy here. 
Scratch my previous comment.

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

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

Reply via email to