brender-1997/math/brmath.h

81 lines
1.5 KiB
C
Raw Normal View History

2022-05-03 16:30:35 -05:00
/*
* Copyright (c) 1993-1995 by Argonaut Technologies Limited. All rights reserved.
*
* $Id: brmath.h 2.5 1997/08/13 10:53:20 JOHNG Exp $
* $Locker: $
*
* Wrappers around standard C math functions
*/
#ifndef _BRMATH_H_
#define _BRMATH_H_
#include <stdarg.h>
#ifndef _NO_PROTOTYPES
#if !defined(_MSC_VER)
#ifdef __cplusplus
extern "C" {
#endif
float BR_PUBLIC_ENTRY BrFloatFloor(float f);
float BR_PUBLIC_ENTRY BrFloatCeil(float f);
float BR_PUBLIC_ENTRY BrFloatSqrt(float f);
float BR_PUBLIC_ENTRY BrFloatPow(float a, float b);
float BR_PUBLIC_ENTRY BrFloatAtan2(float x, float y);
#ifdef __cplusplus
};
#endif
#endif
/*
* Compiler specific overrides for functions that are inlined
*/
/*
* Compiler specific overrides
*/
#if defined(__USE_CLIB__)
#include <math.h>
/*
* Force C library operations to be used directly
*/
#define BrFloatFloor(f) ((float)floor(f))
#define BrFloatCeil(f) ((float)ceil(f))
#define BrFloatSqrt(f) ((float)sqrt(f))
#define BrFloatPow(a,b) ((float)pow(a,b))
#define BrFloatAtan2(x,y) ((float)atan2((x),(y)))
#elif defined(__WATCOMC__)
#elif defined(_MSC_VER)
#include <math.h>
/*
* Force C library operations to be used directly
*/
#define BrFloatFloor(f) ((float)floor(f))
#define BrFloatCeil(f) ((float)ceil(f))
#define BrFloatSqrt(f) ((float)sqrt(f))
#define BrFloatPow(a,b) ((float)pow(a,b))
#define BrFloatAtan2(x,y) ((float)atan2((x),(y)))
#elif defined (__BORLANDC__)
#elif defined(__PROTON__)
#elif defined(__GNUC__) && defined(i386)
#endif
#endif
#endif