summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-28 05:46:11 +0100
committerTreeki <treeki@gmail.com>2013-02-28 05:46:11 +0100
commit73cf9df88eeb7b6193dd3c2c53b1c796a196418c (patch)
tree349e27d484a8830c712a4870963185ad38cb0cbd /include/common.h
parent20faadcbf59fee0c216590bd4372a268a2594783 (diff)
downloadkamek-73cf9df88eeb7b6193dd3c2c53b1c796a196418c.tar.gz
kamek-73cf9df88eeb7b6193dd3c2c53b1c796a196418c.zip
your daily dose of API additions
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h4
1 files changed, 4 insertions, 0 deletions
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 } }