A function for determining if anything is an Integer. Used widely to validate parameters.
A function for determining if every element of an Array is greater than or equal to zero. Used in the determination of the Geometric Mean.
A function used to determine the sign of a number. Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign The Harmony ECMAScript 6 proposal includes Math.sign(), which would replace this helper.
A function used to add convenience methods to distributions, e.g., .p(x)
, .f(x)
, .F(x)
.
A function for sorting a simple Array in numerical, rather than lexicographical, order.
A function for converting degrees to radians.
If it's a string, explicitly in degrees, e.g, "47.3°", convert it to radians
If it's a string, assume it's already in radians
If it's a number, assume it's already in radians
A function for returning the logarithm of y with base x (ie. logx y), taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log
TODO:
A function for generating a random number between min and mix, inclusive, taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
A function for generating a random integer between min and max, inclusive, taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
Helpers
A small collection of helper methods.