From 982df5fe197c4db2be4bffe59a05c837b7508365 Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Wed, 19 Oct 2022 15:09:07 +0200 Subject: Initial psxgte cleanup --- libpsn00b/psxgte/hisin.c | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 libpsn00b/psxgte/hisin.c (limited to 'libpsn00b/psxgte/hisin.c') diff --git a/libpsn00b/psxgte/hisin.c b/libpsn00b/psxgte/hisin.c deleted file mode 100644 index 68d5d28..0000000 --- a/libpsn00b/psxgte/hisin.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Based on isin_S4 implementation from coranac: - * http://www.coranac.com/2009/07/sines/ - * - */ - -#define qN 15 -#define qA 12 -#define B 19900 -#define C 3516 - -int hisin(int x) { - - int c, x2, y; - - c= x<<(30-qN); // Semi-circle info into carry. - x -= 1< cosine calc - - x= x<<(31-qN); // Mask with PI - x= x>>(31-qN); // Note: SIGNED shift! (to qN) - x= x*x>>(2*qN-14); // x=x^2 To Q14 - - y= B - (x*C>>14); // B - x^2*C - y= (1<>16); // A - x^2*(B-x^2*C) - - return c>=0 ? y : -y; - -} - -int hicos(int x) { - - return hisin( x+32768 ); - -} -- cgit v1.2.3