ReactOS  0.4.13-dev-1089-g05f0b08
fixed.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FIXED_ONE   0x00000800
 
#define FIXED_HALF   0x00000400
 
#define FIXED_FRAC_MASK   0x000007FF
 
#define FIXED_INT_MASK   (~FIXED_FRAC_MASK)
 
#define FIXED_EPSILON   1
 
#define FIXED_SCALE   2048.0f
 
#define FIXED_SHIFT   11
 
#define FloatToFixed(X)   ((GLfixed) ((X) * FIXED_SCALE))
 
#define IntToFixed(I)   ((I) << FIXED_SHIFT)
 
#define FixedToInt(X)   ((X) >> FIXED_SHIFT)
 
#define FixedToUns(X)   (((unsigned int)(X)) >> 11)
 
#define FixedCeil(X)   (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK)
 
#define FixedFloor(X)   ((X) & FIXED_INT_MASK)
 
#define FixedToFloat(X)   ((X) * 0.00048828125f)
 
#define PosFloatToFixed(X)   FloatToFixed(X)
 
#define SignedFloatToFixed(X)   FloatToFixed(X)
 

Typedefs

typedef int GLfixed
 

Macro Definition Documentation

◆ FIXED_EPSILON

#define FIXED_EPSILON   1

Definition at line 42 of file fixed.h.

◆ FIXED_FRAC_MASK

#define FIXED_FRAC_MASK   0x000007FF

Definition at line 40 of file fixed.h.

◆ FIXED_HALF

#define FIXED_HALF   0x00000400

Definition at line 39 of file fixed.h.

◆ FIXED_INT_MASK

#define FIXED_INT_MASK   (~FIXED_FRAC_MASK)

Definition at line 41 of file fixed.h.

◆ FIXED_ONE

#define FIXED_ONE   0x00000800

Definition at line 38 of file fixed.h.

◆ FIXED_SCALE

#define FIXED_SCALE   2048.0f

Definition at line 43 of file fixed.h.

◆ FIXED_SHIFT

#define FIXED_SHIFT   11

Definition at line 44 of file fixed.h.

◆ FixedCeil

#define FixedCeil (   X)    (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK)

Definition at line 49 of file fixed.h.

◆ FixedFloor

#define FixedFloor (   X)    ((X) & FIXED_INT_MASK)

Definition at line 50 of file fixed.h.

◆ FixedToFloat

#define FixedToFloat (   X)    ((X) * 0.00048828125f)

Definition at line 52 of file fixed.h.

◆ FixedToInt

#define FixedToInt (   X)    ((X) >> FIXED_SHIFT)

Definition at line 47 of file fixed.h.

◆ FixedToUns

#define FixedToUns (   X)    (((unsigned int)(X)) >> 11)

Definition at line 48 of file fixed.h.

◆ FloatToFixed

#define FloatToFixed (   X)    ((GLfixed) ((X) * FIXED_SCALE))

Definition at line 45 of file fixed.h.

◆ IntToFixed

#define IntToFixed (   I)    ((I) << FIXED_SHIFT)

Definition at line 46 of file fixed.h.

◆ PosFloatToFixed

#define PosFloatToFixed (   X)    FloatToFixed(X)

Definition at line 53 of file fixed.h.

◆ SignedFloatToFixed

#define SignedFloatToFixed (   X)    FloatToFixed(X)

Definition at line 54 of file fixed.h.

Typedef Documentation

◆ GLfixed

typedef int GLfixed

Definition at line 36 of file fixed.h.