Miscellaneous mathematics functions. More...
#include "Musimat.h"#include <math.h>Go to the source code of this file.
Functions | |
| template<class Type > | |
| Type | Abs (Type x) |
| Absolute value. | |
| template<class Type > | |
| Type | Mod (Type j, Type k) |
| j modulo k. | |
| template<class Type > | |
| Type | PosMod (Type j, Type k) |
| Positive wing of j modulo k. | |
| Real | Floor (Real x) |
| Floor function. | |
| Real | Ceiling (Real x) |
| Ceiling function. | |
| Real | Sqrt (Real x) |
| Square root. | |
| Real | Pow (Real x, Real y) |
| x to the power of y. | |
| template<class Type > | |
| Type | Log (Type x) |
| Log of x to the base E. | |
| template<class Type > | |
| Type | Log10 (Type x) |
| Log base 10 of x. | |
| template<class Type > | |
| Type | Atan (Type x) |
| Arctangent of x. | |
| template<class Type > | |
| Type | Atan2 (Type x, Type y) |
| Arctangent of ratio expressed as numerator x and denominator y. | |
| template<class Type > | |
| Type | Sin (Type x) |
| Sine of Type x. | |
| template<class Type > | |
| Type | Cos (Type x) |
| Cosine of Type x. | |
| Real | unitInterp (Real f, Integer L, Integer U) |
| Unit interpolation. | |
| Real | linearInterpolate (Integer x, Integer xMin, Integer xMax, Integer yMin, Integer yMax) |
| Linear interpolation. | |
| Real | Round (Real x) |
| Rounding. | |
| Integer | RealToRational (Real f, Integer Reference a, Integer Reference b) |
| Convert Real value to rational value. | |
| template<class Type > | |
| Type | Plus (Type i, Type j) |
| Rule for Type + Type. | |
| template<class Type > | |
| Type | Minus (Type i, Type j) |
| Rule for Type - Type. | |
| template<class Type > | |
| Type | Divide (Type i, Type j) |
| Rule for Type / Type. | |
| template<class Type > | |
| Type | Multiply (Type i, Type j) |
| Rule for Type * Type. | |
Variables | |
| Const Real | Pi = 4.0 * atan( 1.0 ) |
| A convenient way to calculate the value of Pi. | |
Miscellaneous mathematics functions.
Definition in file MathFuns.h.
A convenient way to calculate the value of Pi.
Pi computed to the machine precision of a Real.
Always works to the precision of your hardware.
Definition at line 26 of file MathFuns.h.
1.7.2