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