A WHOLE 1.5 FPS!!
This commit is contained in:
1 parent
5567984cad
commit
9f6f0399e7
6 files changed
+24
-30
No files matched your search
@@ -40,20 +40,6 @@ void setColor(volatile unsigned char* fb, colour_t pixel, long x, long y, long p
|
||||
}
|
||||
}
|
||||
|
||||
double sin(double x)
|
||||
{
|
||||
double x2 = x * x;
|
||||
if (x < PI)
|
||||
return (((((-0.0000000205342856289746600727*x2 + 0.00000270405218307799040084)*x2 - 0.000198125763417806681909)*x2 + 0.00833255814755188010464)*x2 - 0.166665772196961623983)*x2 + 0.999999707044156546685)*x;
|
||||
|
||||
else if (x <= PI * 2) return (-sin(x - PI));
|
||||
|
||||
while (x > PI * 2)
|
||||
x -= PI * 2;
|
||||
|
||||
return sin(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ arm-016-util.h
|
||||
#ifndef RPI_UTIL_H
|
||||
#define RPI_UTIL_H
|
||||
|
||||
#define PI 3.14159265359
|
||||
#define SCREEN_WIDTH 1920
|
||||
#define SCREEN_HEIGHT 1080
|
||||
#define SCREEN_WIDTH 640
|
||||
#define SCREEN_HEIGHT 480
|
||||
#define SCREEN_DEPTH 24 /* 16 or 32-bit */
|
||||
|
||||
#define COLOUR_DELTA 0.05 /* Float from 0 to 1 incremented by this amount */
|
||||
@@ -22,6 +21,5 @@ typedef struct {
|
||||
|
||||
|
||||
extern void setColor(volatile unsigned char* fb, colour_t pixel, long x, long y, long pitch);
|
||||
extern double sin(double in);
|
||||
|
||||
#endif
|
||||
@@ -47,7 +47,4 @@ typedef volatile uint64_t rpi_wreg_rw_t;
|
||||
typedef volatile const uint64_t rpi_wreg_ro_t;
|
||||
|
||||
|
||||
int GET32(int index);
|
||||
void PUT32(int index, int value);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user