XenevaOS
Loading...
Searching...
No Matches
m_fixed.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// DESCRIPTION:
16// Fixed point arithemtics, implementation.
17//
18
19
20#ifndef __M_FIXED__
21#define __M_FIXED__
22
23
24
25
26//
27// Fixed point, 32bit as 16.16.
28//
29#define FRACBITS 16
30#define FRACUNIT (1<<FRACBITS)
31
32typedef int fixed_t;
33
36
37
38
39#endif
size_t a
Definition main.cpp:156
size_t b
Definition main.cpp:156
int fixed_t
Definition m_fixed.h:32
fixed_t FixedMul(fixed_t a, fixed_t b)
Definition m_fixed.c:35
fixed_t FixedDiv(fixed_t a, fixed_t b)
Definition m_fixed.c:47