From 73cf9df88eeb7b6193dd3c2c53b1c796a196418c Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 28 Feb 2013 05:46:11 +0100 Subject: your daily dose of API additions --- include/common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 38e9c86..44c3652 100644 --- a/include/common.h +++ b/include/common.h @@ -113,6 +113,10 @@ char *RetrieveFileFromArcAlt(void *table, char *name, char *path);*/ extern void *ArchiveHeap; // PAL 0x8042A72C, NTSC 0x8042A44C +namespace nw4r { namespace math { float FrSqrt(float); }} +float sqrtf(float x) { + return (x <= 0) ? 0.0f : x * nw4r::math::FrSqrt(x); +} #ifdef __MWERKS__ #define InfiniteLoop for (;;) { asm { nop } } -- cgit v1.2.3