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 
fixmul(fix a,fix b)22 fix fixmul(fix a, fix b)
23 {
24 	longlong tmp;
25 	tmp = (longlong)a * (longlong)b;
26 	return (fix)(tmp>>16);
27 }
28 
fixdiv(fix a,fix b)29 fix fixdiv(fix a, fix b)
30 {
31 	return MulDiv(a,65536,b);
32 }
33 
fixmuldiv(fix a,fix b,fix c)34 fix fixmuldiv(fix a, fix b,fix c)
35 {
36 	return MulDiv(a,b,c);
37 }
38