53 return ((a.
r == b.
r) && (a.
g == b.
g) && (a.
b == b.
b));
63inline T
abs(
const T &x) {
64 return (x > 0 ? x : -x);
74inline int sign(
const T &x) {
75 return (x >= 0 ? 1 : -1);
98inline T
bound(
const T &x,
const T &min,
const T &max) {
99 return (x < min ? min : (x > max ? max : x));
113 return ((x < min) || (x > max));
122 return static_cast<int>(x + 0.5F);
131 return static_cast<int>(x + 0.5);
141 return exp(-
square(val / sigma) / 2) / (sqrt(2 * M_PI) * sigma);
double gaussian(double val, double sigma)
Get gaussian value of val based on sigma
T square(const T &x)
get square of value x
bool operator==(const rgb &a, const rgb &b)
Definition of equal sign
int vlib_round(float x)
Get round value of x
bool check_bound(const T &x, const T &min, const T &max)
Check bound of x
int sign(const T &x)
Get sign of value x
T abs(const T &x)
Get absolute value of x
T bound(const T &x, const T &min, const T &max)
Get bound of value x