r1010: Save mask point coordinates using %g instead of %e to save space.
[cinelerra_cv/ct.git] / guicast / workarounds.C
blob0531e45787cbf05f7ee1a432387c0b4327bd5126
1 #include "clip.h"
2 #include <math.h>
3 #include "workarounds.h"
5 void Workarounds::copy_int(int &a, int &b)
7         a = b;
10 double Workarounds::divide_double(double a, double b)
12         return a / b;
15 void Workarounds::copy_double(double *a, double b)
17         *a = b;
21 void Workarounds::clamp(int32_t &x, int32_t y, int32_t z)
23         if(x < y) x = y;
24         else
25         if(x > z) x = z;
28 void Workarounds::clamp(int64_t &x, int64_t y, int64_t z)
30         if(x < y) x = y;
31         else
32         if(x > z) x = z;
35 void Workarounds::clamp(float &x, float y, float z)
37         if(x < y) x = y;
38         else
39         if(x > z) x = z;
42 void Workarounds::clamp(double &x, double y, double z)
44         if(x < y) x = y;
45         else
46         if(x > z) x = z;
49 float Workarounds::pow(float x, float y)
51         return powf(x, y);