home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / include / fix-num.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-27  |  1.2 KB  |  36 lines

  1. /* fix-num.h: declarations for ``fix'' numbers, which are a 32-bit
  2.    word with 20 bits of fraction.
  3.  
  4. Copyright (C) 1992 Free Software Foundation, Inc.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #ifndef FIX_NUM_H
  21. #define FIX_NUM_H
  22.  
  23. #include "types.h"
  24.  
  25.  
  26. /* The type.  */
  27. typedef long fix_word;
  28.  
  29. /* Conversions to and from C floating-point numbers.  The conversions
  30.    may not be exact, but since we use this to represent physical
  31.    quantities, a tiny loss of accuracy does not matter.  */
  32. extern const real fix_to_real (fix_word);
  33. extern const fix_word real_to_fix (real);
  34.  
  35. #endif /* not FIX_NUM_H */
  36.