-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The current Math.min function only supports comparing two arguments at a time. For scenarios requiring the minimum value among multiple numbers, developers need to use nested Math.min calls or implement custom logic, which can reduce code readability and increase complexity.
Enhancement:
Introduce overloaded versions of Math.min to handle an arbitrary number of arguments for int, long, float, and double types using varargs. This will simplify code and align with the intuitive expectation of a "minimum" function.
The current Math.min function only supports comparing two arguments at a time. For scenarios requiring the minimum value among multiple numbers, developers need to use nested Math.min calls or implement custom logic, which can reduce code readability and increase complexity.
Enhancement:
Introduce overloaded versions of Math.min to handle an arbitrary number of arguments for int, long, float, and double types using varargs. This will simplify code and align with the intuitive expectation of a "minimum" function.
- links to
-
Review(master) openjdk/jdk/23138