AbstractStaticsafeSafely finds the minimum value from an array of numbers. Returns Infinity for empty arrays (mathematically correct: empty set has no minimum). This prevents subtle bugs where 0 might be confused with actual data.
Array of numbers to find minimum from
The minimum value or Infinity if array is empty
StaticsafeSafely finds the maximum value from an array of numbers. Returns -Infinity for empty arrays (mathematically correct: empty set has no maximum). This prevents subtle bugs where 0 might be confused with actual data.
Array of numbers to find maximum from
The maximum value or -Infinity if array is empty
StaticminFinds the minimum value from a 2D array of numbers.
2D array of numbers
The minimum value across all nested arrays
StaticmaxFinds the maximum value from a 2D array of numbers.
2D array of numbers
The maximum value across all nested arrays
StaticminFinds min and max from an array in a single pass. More efficient than separate min/max calls for large arrays. Returns { min: Infinity, max: -Infinity } for empty arrays.
Array of numbers
Object with min and max properties
StaticminFinds min and max from a 2D array in a single pass.
2D array of numbers
Object with min and max properties
Mathematical utility functions for common operations across the codebase. These utilities help reduce code duplication while maintaining type safety.