43 #ifndef __EST_INLINE_UTILS_H__ 44 #define __EST_INLINE_UTILS_H__ 47 static inline int irint(
float f) {
return (
int)(f+0.5); }
49 static inline int irint(
double f) {
return (
int)(f+0.5); }
51 static inline int srint(
float f) {
return (
short)(f+0.5); }
53 static inline int srint(
double f) {
return (
short)(f+0.5); }
55 static inline int ifloor(
float f) {
return (
int)(
f); }
57 static inline int iceil(
float f) {
return (
int)(f+0.9999999); }
60 static inline int min(
int a,
int b) {
return (a<b)?a:b; }
62 static inline int max(
int a,
int b) {
return (a>b)?a:b; }
64 static inline float min(
float a,
float b) {
return (a<b)?a:b; }
66 static inline float max(
float a,
float b) {
return (a>b)?a:b; }
68 static inline double min(
double a,
double b) {
return (a<b)?a:b; }
70 static inline double max(
double a,
double b) {
return (a>b)?a:b; }
73 static inline short absval(
short n) {
return n<0?-n:n; }
75 static inline int absval(
int n) {
return n<0?-n:n; }
77 static inline float absval(
float n) {
return n<0.0?-n:n; }
79 static inline double absval(
double n) {
return n<0.0?-n:n; }
float max(float a, float b)
float min(float a, float b)