Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v6]

2023-02-07 Thread Raffaello Giulietti
On Tue, 7 Feb 2023 12:43:56 GMT, Tagir F. Valeev wrote: >> test/jdk/java/lang/Math/Clamp.java line 149: >> >>> 147: {-0.0, 0.0, 0.0, 0.0}, >>> 148: {0.0, 0.0, 0.0, 0.0}, >>> 149: {1.0, 0.0, 0.0, 0.0}, >> >> What about adding similar tests for the

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v6]

2023-02-07 Thread Tagir F . Valeev
On Tue, 7 Feb 2023 11:33:12 GMT, Raffaello Giulietti wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Whitespace fixed > > test/jdk/java/lang/Math/Clamp.java line 149: > >> 147: {-0.0, 0.0, 0.0,

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v6]

2023-02-07 Thread Raffaello Giulietti
On Tue, 7 Feb 2023 10:24:24 GMT, Tagir F. Valeev wrote: >> clamp() methods added to Math and StrictMath >> >> `int clamp(long, int, int)` is somewhat different, as it accepts a `long` >> value and safely clamps it to an `int` range. Other overloads work with a >> particular type (long, float a

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v6]

2023-02-07 Thread Tagir F . Valeev
> clamp() methods added to Math and StrictMath > > `int clamp(long, int, int)` is somewhat different, as it accepts a `long` > value and safely clamps it to an `int` range. Other overloads work with a > particular type (long, float and double). Using similar approach in other > cases (e.g. `flo