mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-25 20:30:31 +00:00
ds: fix up some things
This commit is contained in:
parent
d7f7c5921d
commit
ae4b392cb5
@ -1,9 +1,9 @@
|
||||
ANSI2PNG = ~/research/ansi2gif/ansi2gif.git/ansi2png
|
||||
|
||||
all: kfest.png
|
||||
all: kfest2020.png
|
||||
|
||||
kfest.png: kfest.ans
|
||||
$(ANSI2PNG) --ysize auto kfest.ans > kfest.png
|
||||
kfest2020.png: kfest2020.ans
|
||||
$(ANSI2PNG) --ysize auto kfest2020.ans > kfest2020.png
|
||||
|
||||
clean:
|
||||
rm -f kfest.png *~
|
||||
rm -f kfest2020.png *~
|
||||
|
@ -2,7 +2,18 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define ANGLE_STEPS 16
|
||||
#define ANGLE_STEPS 64
|
||||
|
||||
static int double_to_fixed(double d) {
|
||||
|
||||
int temp;
|
||||
|
||||
temp=d*4096;
|
||||
|
||||
return temp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
@ -12,7 +23,7 @@ int main(int argc, char **argv) {
|
||||
printf("Sin\n");
|
||||
for(i=0;i<ANGLE_STEPS;i++) {
|
||||
angle=3.1415926535897932384*2.0*((double)i/(double)ANGLE_STEPS);
|
||||
printf("%d %lf\n",i,sin(angle));
|
||||
printf("%d %lf %x\n",i,sin(angle),double_to_fixed(sin(angle)));
|
||||
}
|
||||
|
||||
printf("Cos\n");
|
||||
|
Loading…
Reference in New Issue
Block a user