A small math function collection based on the Taylor expansion series.
You can copy the files directly into your project folder or build a library file on your own, but it is often not worth it. The library uses the types TMath::DOUBLE
(long double
) and TMath::LONG
(long long
) for parameters and return values.
Function | Description |
---|---|
sin(x) |
sine of x |
asin(x) |
arcsine of x |
sinh(x) |
hyperbolic sine of x |
cos(x) |
cosine of x |
acos(x) |
arccosine of x |
cosh(x) |
hyperbolic cosine of x |
tan(x) |
tangent of x |
atan(x) |
arctangent of x |
cot(x) |
cotangent of x |
acot(x) |
arccotangent of x |
coth(x) |
hyperbolic cotangent of x |
sec(x) |
secant of x |
arcsec(x) |
arcsecant of x |
sech(x) |
hyperbolic secant of x |
cosec(x) |
cosecant of x |
arccsc(x) |
arccosecant of x |
csch(x) |
hyperbolic cosecant of x |
floor(x) |
next lower integer of x |
ceil(x) |
next higher integer of x |
mod(x, y) |
the remainder of the division x / y |
exp(x) |
natural exponential function |
sqrt(x) |
squareroot of x |
root(x, n) |
n-th root of x |
ln(x) |
natural logarithm of x |
lg(x) |
common logarithm of x |
lb(x) |
binary logarithm of x |
log(n, x) |
logarithm with base n of x |
pow(x, n) |
x to the power of n |
fac(n) |
factorial of n |
rad(x) |
degrees to radiant |
deg(x) |
radiant to degrees |
- Linear algebra (vectors, matrices)