fixpt.h File Reference
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Detailed Description
Data structures and macros for dealing with integer-based fixed point math.
These macros use integer instructions for a special "fixed point" format. The fractional part is stored in 28-bit integer form, to prevent roundoff errors.
Author - Michael John Muuss
Source - SECAD/VLD Computing Consortium, Bldg 394 The U. S. Army Ballistic Research Laboratory Aberdeen Proving Ground, Maryland 21005
- Header
- /cvsroot/brlcad/brlcad/src/librt/fixpt.h,v 14.9 2006/01/18 06:46:17 brlcad Exp
Definition in file fixpt.h.
Define Documentation
#define FIXPT_SCALE ((1<<28)-1) |
|
#define FIXPT_FLOAT |
( |
fp, |
|
|
fl |
|
) |
|
|
|
Value:
Definition at line 55 of file fixpt.h. |
#define FLOAT_FIXPT |
( |
fp |
|
) |
( fp.i + ((double)fp.f)/FIXPT_SCALE ) |
|
#define FIXPT_NORMALIZE |
( |
fp |
|
) |
|
|
|
Value:
Definition at line 62 of file fixpt.h. |
#define FIXPT_ROUND |
( |
fp |
|
) |
|
|
|
Value:
Definition at line 75 of file fixpt.h. |
#define FIXPT_ADD2 |
( |
o, |
|
|
a, |
|
|
b |
|
) |
|
|
|
Value:
Definition at line 81 of file fixpt.h. |
#define PR_FIX |
( |
str, |
|
|
fp |
|
) |
bu_log("%s = %2d+x%8.8x\n", str, fp.i, fp.f ) |
|
#define PR_FIX2 |
( |
str, |
|
|
fp |
|
) |
|
|
|
Value: bu_log("%s = (%2d+x%8.8x,%2d+x%8.8x)\n", \
str, fp[0].i, fp[0].f, fp[1].i, fp[1].f )
Definition at line 88 of file fixpt.h. |
Generated on Mon Sep 18 01:25:05 2006 for BRL-CAD by
1.4.6