Extends Lua 5.2 math.
local math = require('__stdlib__/stdlib/utils/math')
Math.arithmetic_mean(x) | Calculates the arithmetic mean of a set of values. |
Math.clamp(x, min, max) | Returns the number x clamped between the numbers min and max |
Math.energetic_mean(x) | Calculates the energetic mean of a set of values. |
Math.generalized_mean(p, ...) | Calculates the generalized mean (to a specified power) of a set of values. |
Math.geometric_mean(x) | Calculates the geometric mean of a set of values. |
Math.harmonic_mean(...) | Calculates the harmonic mean of a set of values. |
Math.midrange_mean(x) | Calculates the midrange mean of a set of values. |
Math.quadratic_mean(...) | Calculates the quadratic mean of a set of values. |
Math.round(x) | Round a number. |
Math.sum(...) | Calculates the sum of a sequence of values. |
Math.weighted_mean(x, w) | Calculates the weighted mean of a set of values. |
Calculates the arithmetic mean of a set of values.
Parameters:
Returns the number x clamped between the numbers min and max
Parameters: Returns:
Calculates the energetic mean of a set of values.
Parameters:
Calculates the generalized mean (to a specified power) of a set of values.
Parameters:
Calculates the geometric mean of a set of values.
Parameters:
Calculates the harmonic mean of a set of values.
Parameters:
Calculates the midrange mean of a set of values.
Parameters:
Calculates the quadratic mean of a set of values.
Parameters: