ReactOS
0.4.16-dev-297-gc569aee
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
fixed.h
Go to the documentation of this file.
1
/* $Id: fixed.h,v 1.2 1996/10/01 03:31:04 brianp Exp $ */
2
3
/*
4
* Mesa 3-D graphics library
5
* Version: 2.0
6
* Copyright (C) 1995-1996 Brian Paul
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Library General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Library General Public License for more details.
17
*
18
* You should have received a copy of the GNU Library General Public
19
* License along with this library; if not, write to the Free
20
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
*/
22
23
24
/*
25
*
26
* Revision 1.1 1996/09/13 01:38:16 brianp
27
* Initial revision
28
*
29
*/
30
31
32
#ifndef FIXED_H
33
#define FIXED_H
34
35
36
typedef
int
GLfixed
;
37
38
#define FIXED_ONE 0x00000800
39
#define FIXED_HALF 0x00000400
40
#define FIXED_FRAC_MASK 0x000007FF
41
#define FIXED_INT_MASK (~FIXED_FRAC_MASK)
42
#define FIXED_EPSILON 1
43
#define FIXED_SCALE 2048.0f
44
#define FIXED_SHIFT 11
45
#define FloatToFixed(X) ((GLfixed) ((X) * FIXED_SCALE))
46
#define IntToFixed(I) ((I) << FIXED_SHIFT)
47
#define FixedToInt(X) ((X) >> FIXED_SHIFT)
48
#define FixedToUns(X) (((unsigned int)(X)) >> 11)
49
#define FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK)
50
#define FixedFloor(X) ((X) & FIXED_INT_MASK)
51
/* 0.00048828125 = 1/FIXED_SCALE */
52
#define FixedToFloat(X) ((X) * 0.00048828125f)
53
#define PosFloatToFixed(X) FloatToFixed(X)
54
#define SignedFloatToFixed(X) FloatToFixed(X)
55
56
57
#endif
GLfixed
int GLfixed
Definition:
fixed.h:36
dll
opengl
mesa
fixed.h
Generated on Tue Nov 26 2024 06:03:23 for ReactOS by
1.9.6