26 #ifndef __MISC_H__INCL__
27 #define __MISC_H__INCL__
88 inline bool IsEven(
int64 number) {
return ((number %2) == 0); }
89 inline bool IsNaN(
double x) {
return x!= x; }
95 inline double min(
double x,
double y) {
return ((x < y) ? x : y); }
99 double min1(
double x,
double y);
101 double min(
double x,
double y,
double z);
105 inline double max(
double x,
double y=0) {
return ((x >
y) ? x :
y); }
107 double max(
double x,
double y,
double z);
111 bool icontains(std::string data, std::string toSearch,
size_t pos = 0);
itemID[count] Create count or of the specified() x() y(z)-Jump to the specified position in space.Stopped." ) COMMAND( translocate
double trunicate2(double dig=0)
double min(double x, double y)
int64 filesize(const char *filename)
Obtains filesize.
uint16 crc_hqx(const uint8 *data, size_t len, uint16 crc=0)
bool IsEven(int64 number)
double MakeRandomFloat(double low=0, double high=1)
Generates random real from interval [low; high].
uint32 CreatePIDFile(const std::string &filename)
create PID file
double min1(double x, double y)
int64 max(int64 x, int64 y=0)
int64 MakeRandomInt(int64 low=0, int64 high=RAND_MAX)
Generates random integer from interval [low; high].
int64 npowof2(int64 num)
Calculates next (greater or equal) power-of-two number.
const char * FormatTime(int64 time=-1)
bool icontains(std::string data, std::string toSearch, size_t pos=0)