Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8603

Move math functions abs, ceil, floor, round, min, max from stdlib to puppet

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.0.0
    • Docs
    • New Feature
    • Hide
      The math functions abs, ceil, floor, round, min, and max are now available in puppet. The functions are compatible with the functions with the same name in stdlib with the added feature in min/max if calling them with a single array and being able to use a lambda with a custom compare.

      These stdlib math functions used inconsistent string to numeric conversions that were also unintentionally making the functions compare values in strange ways. The automatic conversions are now deprecated and will issue a warning.
      Show
      The math functions abs, ceil, floor, round, min, and max are now available in puppet. The functions are compatible with the functions with the same name in stdlib with the added feature in min/max if calling them with a single array and being able to use a lambda with a custom compare. These stdlib math functions used inconsistent string to numeric conversions that were also unintentionally making the functions compare values in strange ways. The automatic conversions are now deprecated and will issue a warning.
    • Needs Assessment

    Description

      The math functions abs, ceil, floor, round, min, max should be moved from stdlib to puppet and be modernized to the 4.x function API. They must be backwards compatible but can be extended in functionality where wanted (for example supporting array arguments if not already supported in current implementation).

      Attachments

        Activity

          People

            Unassigned Unassigned
            henrik.lindberg Henrik Lindberg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support