An attempt at a math library with various mathematical functions written i C++.
To build the library, just run:
mkdir build && cd build && cmake ..
Then just run ./QuickMath.out
to run main with any functions from the
library. To clean up the build files just run rm -rf build
.
- Math
- Factorial
- Pascal
- LinAlg
- Trig
Basic mathematical functions that are used by the other parts of the library.
- power
- sqRoot
A simple function to calculate the factorial of a number.
Two functions, one to calculate Pascal's triangle and one to print Pascal's triangle.
A collection of functions to perform Linear Algebra calculations. Currently supports range of calculations involving vectors as well as basic calculations involving matrices. Vectors can be initialized with values to be 1, 2, 3 or 4 dimensional but can also be initialized with a std::vector to be of any dimension. Matrices can be of any dimension.
- getVector
- addVector
- subtractVector
- scalarMultiply
- vectorSum
- vectorDifference
- vectorScalarMultiplication
- dotProduct
- crossProduct
- getLength
- calculateLength
- calculateAngle
- size
- getMatrix
- setMatrix
- getRowVector
- getColumnVector
- getSubMatrix
- getRows
- getColumns
- zero
- linearTransform
- matrixSum
- matrixDifference
- matrixScalarMultiplication
- matrixMultiplication
- linearTransformation
- calculateDeterminant
A collection of functions to perform trigonometric operations. Currently supports sinus, cosine, and tangent functions as well as their inverses.
A collection of simple functions to calculate the amount of permutations and combinations both without repetition and with repetition.
- calculatePermutations
- calculateRepetitivePermutations
- calculateCombinations
- calculateRepetitiveCombinations