home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Equipement / Blender / blender-2.37a-windows.exe / $_5_ / plugins / include / floatpatch.h < prev    next >
C/C++ Source or Header  |  2005-06-14  |  3KB  |  91 lines

  1. /* Copyright (c) 1999, Not a Number / NeoGeo b.v. 
  2.  * $Id: floatpatch.h,v 1.4 2003/04/30 13:21:47 ton Exp $
  3.  * 
  4.  * All rights reserved.
  5.  * 
  6.  * Contact:      info@blender.org   
  7.  * Information:  http://www.blender.org
  8.  *
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in the
  16.  *    documentation and/or other materials provided with the distribution.
  17.  *
  18.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  19.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  22.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  24.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28.  * SUCH DAMAGE.
  29.  */
  30.  
  31. #ifndef FLOATPATCH_H
  32. #define FLOATPATCH_H
  33.  
  34. /* floating point libs differ at systems... with these defines it comilies at all! */
  35.  
  36. #ifdef MIPS1
  37. #else
  38.  
  39. #define fabsf(a)    fabs((double)(a))
  40.  
  41. #define facos        acosf
  42. #define acosf(a)    acos((double)(a))
  43.  
  44. #define fasin        asinf
  45. #define asinf(a)    asin((double)(a))
  46.  
  47. #define fatan        atanf
  48. #define atanf(a)    atan((double)(a))
  49.  
  50. #define fatan2            atan2f
  51. #define atan2f(a, b)    atan2((double)(a), (double)(b))
  52.  
  53. #define fmodf(a, b)        fmod((double)(a), (double)(b))
  54.  
  55. #define fcos        cosf
  56. #define cosf(a)        cos((double)(a))
  57.  
  58. #define fsin        sinf
  59. #define sinf(a)        sin((double)(a))
  60.  
  61. #define ftan        tanf
  62. #define tanf(a)        tan((double)(a))
  63.  
  64. #define fexp        expf
  65. #define expf(a)        exp((double)(a))
  66.  
  67. #define flog        logf
  68. #define logf(a)        log((double)(a))
  69.  
  70. #define flog10        log10f
  71. #define log10f(a)    log10((double)(a))
  72.  
  73. #define fsqrt        sqrtf
  74. #define sqrtf(a)    sqrt((double)(a))
  75.  
  76. #define fceil        ceilf
  77. #define ceilf(a)    ceil((double)(a))
  78.  
  79. #define ffloor        floorf
  80. #define floorf(a)    floor((double)(a))
  81.  
  82. #define fpow        powf
  83. #define powf(a, b)    pow((double)(a), (double)(b))
  84.  
  85. /* #endif  */
  86.  
  87. #endif
  88.  
  89. #endif /* FLOATPATCH_H */
  90.  
  91.