00001 /* 00002 * Copyright (C) Volition, Inc. 1999. All rights reserved. 00003 * 00004 * All source code herein is the property of Volition, Inc. You may not sell 00005 * or otherwise commercially exploit the source or things you created based on the 00006 * source. 00007 * 00008 */ 00009 00010 /* 00011 * $Logfile: /Freespace2/code/Math/fix.h $ 00012 * $Revision: 2 $ 00013 * $Date: 10/07/98 10:53a $ 00014 * $Author: Dave $ 00015 * 00016 * Routines for fixed point math 00017 * 00018 * $Log: /Freespace2/code/Math/fix.h $ 00019 * 00020 * 2 10/07/98 10:53a Dave 00021 * Initial checkin. 00022 * 00023 * 1 10/07/98 10:49a Dave 00024 * 00025 * 4 2/17/97 5:18p John 00026 * Added a bunch of RCS headers to a bunch of old files that don't have 00027 * them. 00028 * 00029 * $NoKeywords: $ 00030 */ 00031 00032 #ifndef _FIX_H 00033 #define _FIX_H 00034 00035 //#include "PsTypes.h" 00036 00037 #define F1_0 65536 00038 #define f1_0 65536 00039 00040 fix fixmul(fix a, fix b); 00041 fix fixdiv(fix a, fix b); 00042 fix fixmuldiv(fix a, fix b, fix c); 00043 00044 #define f2i(a) ((int)((a)>>16)) 00045 #define i2f(a) ((fix)((a)<<16)) 00046 00047 #endif
1.2.16