[sane-devel] what' mean SANE_FIX ?
zhu
zhulicheng at hotmail.com
Wed Jul 24 04:03:36 BST 2002
Hi,
When I read some backends,I often see SANE_FIX and SANE_UNFIX macro,they are defined in sane.h:
#define SANE_FIXED_SCALE_SHIFT 16
#define SANE_FIX(v) ((SANE_Word) ((v) * (1 << SANE_FIXED_SCALE_SHIFT)))
#define SANE_UNFIX(v) ((double)(v) / (1 << SANE_FIXED_SCALE_SHIFT))
Is SANE_FIX(v)=v*32768 and SANE_UNFIX(v)=v/32768 ?
in many backend, when we initialize some value,we SANE_FIX it,when we need to use these value,we SANE_UNFIX it ,Why we shoud do SANE_FIX and SANE_UNFIX ,what SANE_FIX mean ?
Thank you!
Good Luck!
Sincerely
Jason
2002-7-24
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20020724/15424994/attachment.htm>
More information about the sane-devel
mailing list