mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-12 12:30:41 +00:00
plasma: add helper
This commit is contained in:
parent
daceb8ef3b
commit
553a9c34e1
22
graphics/gr/plasma/make_sine.c
Normal file
22
graphics/gr/plasma/make_sine.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#define PI 3.14159265358979323846264338327950
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
double d;
|
||||
int i,r;
|
||||
|
||||
for(i=0;i<16;i++) {
|
||||
|
||||
d=(((double)i)*2.0*PI)/16.0;
|
||||
|
||||
r=32*sin(d);
|
||||
|
||||
printf("%i, %02X\n",i,r);
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user