Everything lives under the M object. Functions include:
- round: Default number of significant digits is 2.
- factorial: Returns NaN for negative numbers.
- limit: Provides an approximation. Works in some cases with +/- Infinity. Needs some additional tweaking.
- derivative: Given f and x, will provide an approximation of the derivative of function f at point x. Round the result to get integers for derivatives of common functions, e.g. of f(x) = 3*x.
A stand-alone three dimensional vector class is included in
vector.js. It has methods for common operations such as calculating a vector's length or dot product. The code is based upon Glenn Fielder's C implementation.