FS2_Open
Open source remastering of the Freespace 2 engine
fix.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 
13 #ifdef _WIN32
14 #include <windows.h>
15 #endif
16 
17 #include "globalincs/pstypes.h"
18 #include "math/fix.h"
19 
20 
21 
23 {
24  longlong tmp;
25  tmp = (longlong)a * (longlong)b;
26  return (fix)(tmp>>16);
27 }
28 
30 {
31  return MulDiv(a,65536,b);
32 }
33 
35 {
36  return MulDiv(a,b,c);
37 }
GLboolean GLboolean GLboolean GLboolean a
Definition: Glext.h:5781
fix fixmuldiv(fix a, fix b, fix c)
Definition: fix.cpp:34
long fix
Definition: pstypes.h:54
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
int MulDiv(int number, int numerator, int denominator)
__int64 longlong
Definition: pstypes.h:60
fix fixdiv(fix a, fix b)
Definition: fix.cpp:29
fix fixmul(fix a, fix b)
Definition: fix.cpp:22
const GLubyte * c
Definition: Glext.h:8376