11 double rsvs3d::Clock2ms(
int clockCycles)
13 return (
double(clockCycles) /
double(CLOCKS_PER_SEC) * 1000.0);
17 #pragma GCC diagnostic push
18 #pragma GCC diagnostic ignored "-Wunused-parameter"
20 int rsvs3d::TimeStamp(
const char *str,
int start_s)
26 cout << str <<
" " << std::setw(5) << Clock2ms(stop_s - start_s) <<
"ms; ";
32 #pragma GCC diagnostic pop
35 void ThrowWarning(
const char *message)
37 cerr << message << endl;
42 double out =
sign(in);
48 else if (fabs(in) > __DBL_EPSILON__)
50 out = out * (log10(fabs(in)) - logeps + 1.0);
54 out = -out * 1.0 / (log10(fabs(in)) - logeps + 1.0);
int sign(T val)
Returns the sign of a type comparable to 0.
double SignedLogScale(double in)
Returns a signed logscale useful for plotting data.
Provides the error and warning system used by the RSVS3D project.