21#define toRad(_deg)((_deg/180) * M_PI)
22#define toDeg(_rad)((_rad/M_PI) * 180)
28#define sign(c)((c>0) ? positive : ((c<0) ? negative : zero))
42 if(is_arithmetic<t>::value){
45 else if(is_same_v<t,string>)
47 return std::to_string(stod(v)/1e-3)+
"10^-3";
54 if(is_arithmetic<t>::value){
57 else if(is_same_v<t,string>)
59 return std::to_string(stod(v)/1e-6)+
"10^-6";
66 if(is_arithmetic<t>::value){
69 else if(is_same_v<t,string>)
71 return std::to_string(stod(v)/1e-9)+
"10^-9";
78 if(is_arithmetic<t>::value){
81 else if(is_same_v<t,string>)
83 return std::to_string(stod(v)/1e3)+
"10^3";
90 if(is_arithmetic<t>::value){
93 else if(is_same_v<t,string>)
95 return std::to_string(stod(v)/1e6)+
"10^6";
102 if(is_arithmetic<t>::value){
105 else if(is_same_v<t,string>)
107 return std::to_string(stod(v)/1e9)+
"10^9";
113#define _USE_MATH_DEFINES
118#define toRad(_deg)((_deg/180) * M_PI)
119#define toDeg(_rad)((_rad/M_PI) * 180)
122 _rad = fmod(_rad + M_PI , 2 * M_PI);
123 if(_rad < 0)_rad += 2*M_PI;
128inline bool isInDomain(
double start,
double end,
double current){
129 if((start <= current)&&(current <= end)){
136inline bool isNear(
double v1,
double v2,
double acc){
137 if( (v1 >= v2*(1 - acc)) && (v1 <= v2*(1 + acc)) ){
146 return round(num/n)*n;
152 return float(clock()/CLOCKS_PER_SEC);
155 cout <<
"\b" << c << endl;
164 bool update_str =
false;
165 int char_place_idx = 0;
183template <
typename DATA>
190 std::vector<elements> elements_found;
192 mode(std::vector<DATA> data_to_mode){
mode(std::vector< DATA > data_to_mode)
double constrain(double _rad)
bool isNear(double v1, double v2, double acc)
void replace_char(char c)
std::string bool_to_string(int v)
bool isInDomain(double start, double end, double current)
contains a basic flexible and extensible interface for file imports and exports operations other stru...
THIS FILE WAS PROVIDED BY OMAR_MAGDY_GHAZY EPE2024 As an abstraction for PDFHummus/PDFWriter lib no w...
implements a simple interface for permanent settings across different parts across the program using ...
void load_string(std::string str)
void update_state(float perc, char c, std::string str)