Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348030

Extend Math.min and Math.max to support multiple parameters

    • 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.



            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: