src/libm/math.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 02 Aug 2009 20:45:11 +0000
changeset 3229 09172593e9b6
parent 3012 7e30c2dc7783
child 3697 f7b03b6838cb
permissions -rw-r--r--
Fixed type size for test_bit()
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2009 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 #include "SDL_stdinc.h"
    24 
    25 /* Math routines from uClibc: http://www.uclibc.org */
    26 
    27 #ifdef HAVE_COPYSIGN
    28 #define copysign        SDL_uclibc_copysign
    29 #else
    30 #define copysign        SDL_copysign
    31 #endif
    32 
    33 #ifdef HAVE_COS
    34 #define cos             SDL_uclibc_cos
    35 #else
    36 #define cos             SDL_cos
    37 #endif
    38 
    39 #ifdef HAVE_FABS
    40 #define fabs            SDL_uclibc_fabs
    41 #else
    42 #define fabs            SDL_fabs
    43 #endif
    44 
    45 #ifdef HAVE_FLOOR
    46 #define floor           SDL_uclibc_floor
    47 #else
    48 #define floor           SDL_floor
    49 #endif
    50 
    51 #ifndef HAVE_LOG
    52 #define __ieee754_log   SDL_log
    53 #endif
    54 
    55 #ifndef HAVE_POW
    56 #define __ieee754_pow   SDL_pow
    57 #endif
    58 
    59 #ifdef HAVE_SCALBN
    60 #define scalbn          SDL_uclibc_scalbn
    61 #else
    62 #define scalbn          SDL_scalbn
    63 #endif
    64 
    65 #ifdef HAVE_SIN
    66 #define sin             SDL_uclibc_sin
    67 #else
    68 #define sin             SDL_sin
    69 #endif
    70 
    71 #ifndef HAVE_SQRT
    72 #define __ieee754_sqrt  SDL_sqrt
    73 #endif
    74 
    75 /* vi: set ts=4 sw=4 expandtab: */