35#define secured_sprintf sprintf_s
37#define secured_sprintf snprintf
59 inline MessageStream(std::ostream & out,
const char * prefix);
88 _out << _prefix << fun;
97inline void secured_ctime(
char * str,
const time_t * t,
size_t count);
99bool base64encode(std::istream & in, std::ostream &,
int linesize = 80);
103void flushFile(
const char * filename, std::ostream & out);
121inline bool almostEqual(
const double & a,
const double & b);
123inline double mix(
const double & a,
const double & b,
const double & time)
125 return a * (1 - time) + (b * time);
128template <
typename T>
inline void unused(
const T &, ...) {}
135 strncpy_s(dst, count, src, _TRUNCATE);
137 strncpy(dst, src, count - 1);
144 ctime_s(str, count, t);
146 strncpy(str, ctime(t), count - 1);
152 const double nothing = 1e-10;
153 return a > b ? ((a - b) < nothing) : (a < b) ? ((b - a) < nothing) :
true;
156template <
typename T>
void clamp(T & value,
const T & min,
const T & max)
168template <
typename T>
inline T
square(
const T & t)
173bool solveQuadratic(
double a,
double b,
double c,
double & x1,
double & x2);
177 return (angle /
M_PI) * 180;
182 return (angle / 180) *
M_PI;
#define M_PI
Definition Shape.h:46
Struct representing a rectangle on the plane.
Definition Rect.h:40