|
Blender
V2.59
|
00001 00004 /* Copyright (c) 1999, Not a Number / NeoGeo b.v. 00005 * $Id: floatpatch.h 35244 2011-02-27 20:32:12Z jesterking $ 00006 * 00007 * All rights reserved. 00008 * 00009 * Contact: info@blender.org 00010 * Information: http://www.blender.org 00011 * 00012 * Redistribution and use in source and binary forms, with or without 00013 * modification, are permitted provided that the following conditions 00014 * are met: 00015 * 1. Redistributions of source code must retain the above copyright 00016 * notice, this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright 00018 * notice, this list of conditions and the following disclaimer in the 00019 * documentation and/or other materials provided with the distribution. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 00022 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00023 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00024 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 00025 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00026 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00027 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00028 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00029 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00030 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00031 * SUCH DAMAGE. 00032 */ 00033 00034 #ifndef FLOATPATCH_H 00035 #define FLOATPATCH_H 00036 00037 /* floating point libs differ at systems... with these defines it comilies at all! */ 00038 00039 #ifdef MIPS1 00040 #else 00041 00042 #define fabsf(a) fabs((double)(a)) 00043 00044 #define facos acosf 00045 #define acosf(a) acos((double)(a)) 00046 00047 #define fasin asinf 00048 #define asinf(a) asin((double)(a)) 00049 00050 #define fatan atanf 00051 #define atanf(a) atan((double)(a)) 00052 00053 #define fatan2 atan2f 00054 #define atan2f(a, b) atan2((double)(a), (double)(b)) 00055 00056 #define fmodf(a, b) fmod((double)(a), (double)(b)) 00057 00058 #define fcos cosf 00059 #define cosf(a) cos((double)(a)) 00060 00061 #define fsin sinf 00062 #define sinf(a) sin((double)(a)) 00063 00064 #define ftan tanf 00065 #define tanf(a) tan((double)(a)) 00066 00067 #define fexp expf 00068 #define expf(a) exp((double)(a)) 00069 00070 #define flog logf 00071 #define logf(a) log((double)(a)) 00072 00073 #define flog10 log10f 00074 #define log10f(a) log10((double)(a)) 00075 00076 #define fsqrt sqrtf 00077 #define sqrtf(a) sqrt((double)(a)) 00078 00079 #define fceil ceilf 00080 #define ceilf(a) ceil((double)(a)) 00081 00082 #define ffloor floorf 00083 #define floorf(a) floor((double)(a)) 00084 00085 #define fpow powf 00086 #define powf(a, b) pow((double)(a), (double)(b)) 00087 00088 /* #endif */ 00089 00090 #endif 00091 00092 #endif /* FLOATPATCH_H */ 00093