#include <deque>
#include <random>
#include <sstream>
#include <unordered_map>
#include <utility>
#include <vector>
#include "mecacell/geometry/vector3D.h"
#include "config.hpp"
#include "logger.hpp"
Go to the source code of this file.
|
namespace | MecaCell |
| this file contains various miscellanious utility functions & helpers *
|
|
namespace | std |
| Provides common mathematical functions and vector operations.
|
|
|
template<typename T > |
T * | MecaCell::ptr (T &obj) |
| returns a pointer (transforms reference into pointer) More...
|
|
template<typename T > |
T * | MecaCell::ptr (T *obj) |
| returns a pointer (transforms reference into pointer) More...
|
|
template<typename T > |
constexpr T | MecaCell::lerp (const T &a, const T &b, const double &c) |
| linear interpolation More...
|
|
template<typename T > |
bool | MecaCell::fuzzyEqual (const T &a, const T &b, double eps=1e-6) |
|
template<typename T > |
bool | MecaCell::isInVector (const T &elem, const std::vector< T > &vec) |
|
template<typename T > |
void | MecaCell::eraseFromVector (const T &elem, std::deque< T > &vec) |
|
template<typename T > |
void | MecaCell::eraseFromVector (const T &elem, std::vector< T > &vec) |
|
std::vector< std::string > | MecaCell::splitStr (const std::string &s, char delim) |
| String spliting. More...
|
|
std::array< double, 3 > | MecaCell::hsvToRgb (double h, double s, double v) |
| transform hsv color space to rgb More...
|
|
template<typename T > |
constexpr T | MecaCell::constpow (const T base, unsigned const exponent) |
|
template<typename T > |
constexpr size_t | MecaCell::eToUI (const T &t) |
|
double | MecaCell::dampingFromRatio (const double r, const double m, const double k) |
|