A collection of various C++ utility functions to help with programming including vectors, arrays, strings, mathematics, and general C++ helpers
Note that C++ 11 is required
Below is a list of all of the included constants and functions.
- The constant PI
- Euler's constant
- Speed of light
- Single space
- Comma
- Back slash
- Period
- Equals sign
- Logging function
- Print vector
- Print pair
- Print boolean as TRUE or FALSE
- Insertion Sort Algorithm
- Merge Sort Algorithm
- Mean value of array or vector
- Median value of array or vector
- Standard deviation of array or vector
- Intersection between two arrays or vectors
- Check if a vector contains a certain value
- Quadratic equation solver
- Magnitude of Complex Number
- Phase of Complex Number
- Factorial
- Number of possible permutations
- Number of possible combinations
- Euclidean Distance 2D
- RANSAC line fitting 2D
- Vector data normalization
- Linear Regression
- Convert to lower case
- Convert to upper case
- Converts double/float types to strings with set number of significant digits
- Delete all spaces within a string
- Trim all spaces on the left side of a string
- Trim all spaces on the right side of a string
- Trim all spaces on the two ends (left and right) of a string
- Extract all seperate word tokens in a string into a vector of strings
- Count the number of occurences of a substring in a string
- Get all of the substring indices from a string