view src/rovascope/pn_utils.h @ 901:08643d5994fe trunk

[svn] - now do_setpos() takes relative position as the argument and works even if cuesheets are included in large playlist. may close #869. - improve handling of end of cue. - suppress warnings.
author yaz
date Mon, 26 Mar 2007 14:44:46 -0700
parents 290588854a9d
children
line wrap: on
line source

#ifndef _PN_UTILS_H
#define _PN_UTILS_H

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

#define CAP(i,c) (i > c ? c : i < -(c) ? -(c) : i)
#define CAPHILO(i,h,l) (i > h ? h : i < l ? l : i)
#define CAPHI(i,h) (i > h ? h : i)
#define CAPLO(i,l) (i < l ? l : i)

#define PN_IMG_INDEX(x,y) ((x) + (pn_image_data->width * (y)))

#endif /* _PN_UTILS_H */