3
|
1 /* $Id: sintab.c,v 1.1.1.1 1997/12/06 05:41:31 darius Exp $ */
|
|
2
|
|
3 /*
|
|
4 * sintab.c
|
|
5 *
|
|
6 * Also initialize blk_giwdth to 100000 and blk_windgwidth
|
|
7 * to WINSIDE/blk_gwidth
|
|
8 */
|
|
9 #include "copyright.h"
|
|
10
|
|
11 double *Cos;
|
|
12 double Sin[] = {
|
|
13 -1.0000, -0.9997, -0.9988, -0.9973, -0.9952, -0.9925,
|
|
14 -0.9892, -0.9853, -0.9808, -0.9757, -0.9701, -0.9638,
|
|
15 -0.9570, -0.9496, -0.9416, -0.9330, -0.9239, -0.9143,
|
|
16 -0.9040, -0.8933, -0.8820, -0.8701, -0.8578, -0.8449,
|
|
17 -0.8315, -0.8176, -0.8033, -0.7884, -0.7731, -0.7573,
|
|
18 -0.7410, -0.7243, -0.7072, -0.6896, -0.6716, -0.6533,
|
|
19 -0.6345, -0.6153, -0.5958, -0.5759, -0.5557, -0.5351,
|
|
20 -0.5142, -0.4930, -0.4715, -0.4497, -0.4277, -0.4054,
|
|
21 -0.3828, -0.3600, -0.3370, -0.3138, -0.2904, -0.2668,
|
|
22 -0.2431, -0.2192, -0.1952, -0.1711, -0.1469, -0.1225,
|
|
23 -0.0982, -0.0737, -0.0492, -0.0247, /* Cos */ -0.0001, 0.0244, /* 90 */
|
|
24 0.0489, 0.0734, 0.0979, 0.1223, 0.1466, 0.1708,
|
|
25 0.1949, 0.2190, 0.2428, 0.2666, 0.2901, 0.3135,
|
|
26 0.3367, 0.3598, 0.3825, 0.4051, 0.4274, 0.4495,
|
|
27 0.4713, 0.4928, 0.5140, 0.5349, 0.5554, 0.5757,
|
|
28 0.5956, 0.6151, 0.6343, 0.6531, 0.6714, 0.6894,
|
|
29 0.7070, 0.7241, 0.7408, 0.7571, 0.7729, 0.7882,
|
|
30 0.8031, 0.8175, 0.8314, 0.8448, 0.8576, 0.8700,
|
|
31 0.8818, 0.8931, 0.9039, 0.9141, 0.9238, 0.9329,
|
|
32 0.9415, 0.9495, 0.9569, 0.9637, 0.9700, 0.9757,
|
|
33 0.9808, 0.9852, 0.9891, 0.9925, 0.9952, 0.9973,
|
|
34 0.9988, 0.9997, 1.0000, 0.9997, 0.9988, 0.9973, /* 180 */
|
|
35 0.9952, 0.9925, 0.9892, 0.9853, 0.9808, 0.9757,
|
|
36 0.9700, 0.9638, 0.9569, 0.9495, 0.9415, 0.9330,
|
|
37 0.9239, 0.9142, 0.9040, 0.8932, 0.8819, 0.8701,
|
|
38 0.8577, 0.8449, 0.8315, 0.8176, 0.8032, 0.7884,
|
|
39 0.7730, 0.7572, 0.7410, 0.7243, 0.7071, 0.6896,
|
|
40 0.6716, 0.6532, 0.6344, 0.6153, 0.5957, 0.5758,
|
|
41 0.5556, 0.5350, 0.5141, 0.4929, 0.4714, 0.4496,
|
|
42 0.4276, 0.4053, 0.3827, 0.3599, 0.3369, 0.3137,
|
|
43 0.2903, 0.2667, 0.2430, 0.2191, 0.1951, 0.1710,
|
|
44 0.1468, 0.1225, 0.0981, 0.0736, 0.0491, 0.0246,
|
|
45 0.0000, -0.0245, -0.0490, -0.0735, -0.0980, -0.1224, /* 270 */
|
|
46 -0.1467, -0.1709, -0.1950, -0.2190, -0.2429, -0.2667,
|
|
47 -0.2902, -0.3136, -0.3368, -0.3598, -0.3826, -0.4052,
|
|
48 -0.4275, -0.4496, -0.4713, -0.4928, -0.5140, -0.5349,
|
|
49 -0.5555, -0.5758, -0.5956, -0.6152, -0.6343, -0.6531,
|
|
50 -0.6715, -0.6895, -0.7071, -0.7242, -0.7409, -0.7572,
|
|
51 -0.7730, -0.7883, -0.8032, -0.8175, -0.8314, -0.8448,
|
|
52 -0.8577, -0.8700, -0.8819, -0.8932, -0.9040, -0.9142,
|
|
53 -0.9238, -0.9330, -0.9415, -0.9495, -0.9569, -0.9638,
|
|
54 -0.9700, -0.9757, -0.9808, -0.9853, -0.9892, -0.9925,
|
|
55 -0.9952, -0.9973, -0.9988, -0.9997, /* }; */
|
|
56 /*
|
|
57 double Cos[] = {
|
|
58 0.0000, 0.0245, 0.0491, 0.0736, 0.0980, 0.1224,
|
|
59 0.1467, 0.1710, 0.1951, 0.2191, 0.2430, 0.2667,
|
|
60 0.2903, 0.3137, 0.3369, 0.3599, 0.3827, 0.4052,
|
|
61 0.4275, 0.4496, 0.4714, 0.4929, 0.5141, 0.5350,
|
|
62 0.5556, 0.5758, 0.5957, 0.6152, 0.6344, 0.6532,
|
|
63 0.6715, 0.6895, 0.7071, 0.7242, 0.7409, 0.7572,
|
|
64 0.7730, 0.7883, 0.8032, 0.8176, 0.8315, 0.8448,
|
|
65 0.8577, 0.8701, 0.8819, 0.8932, 0.9040, 0.9142,
|
|
66 0.9239, 0.9330, 0.9415, 0.9495, 0.9569, 0.9638,
|
|
67 0.9700, 0.9757, 0.9808, 0.9853, 0.9892, 0.9925,
|
|
68 0.9952, 0.9973, 0.9988, 0.9997, 1.0000, 0.9997,
|
|
69 0.9988, 0.9973, 0.9952, 0.9925, 0.9892, 0.9853,
|
|
70 0.9808, 0.9757, 0.9700, 0.9638, 0.9570, 0.9495,
|
|
71 0.9416, 0.9330, 0.9239, 0.9142, 0.9040, 0.8933,
|
|
72 0.8819, 0.8701, 0.8578, 0.8449, 0.8315, 0.8176,
|
|
73 0.8032, 0.7884, 0.7731, 0.7573, 0.7410, 0.7243,
|
|
74 0.7072, 0.6896, 0.6716, 0.6532, 0.6344, 0.6153,
|
|
75 0.5958, 0.5759, 0.5556, 0.5351, 0.5142, 0.4930,
|
|
76 0.4715, 0.4497, 0.4276, 0.4053, 0.3828, 0.3600,
|
|
77 0.3370, 0.3138, 0.2904, 0.2668, 0.2431, 0.2192,
|
|
78 0.1952, 0.1710, 0.1468, 0.1225, 0.0981, 0.0737,
|
|
79 0.0492, 0.0246, 0.0001, -0.0244, -0.0490, -0.0735,
|
|
80 -0.0979, -0.1223, -0.1466, -0.1709, -0.1950, -0.2190,
|
|
81 -0.2429, -0.2666, -0.2902, -0.3136, -0.3368, -0.3598,
|
|
82 -0.3826, -0.4051, -0.4275, -0.4495, -0.4713, -0.4928,
|
|
83 -0.5140, -0.5349, -0.5555, -0.5757, -0.5956, -0.6151,
|
|
84 -0.6343, -0.6531, -0.6715, -0.6895, -0.7070, -0.7242,
|
|
85 -0.7409, -0.7571, -0.7729, -0.7883, -0.8031, -0.8175,
|
|
86 -0.8314, -0.8448, -0.8577, -0.8700, -0.8819, -0.8932,
|
|
87 -0.9039, -0.9142, -0.9238, -0.9329, -0.9415, -0.9495,
|
|
88 -0.9569, -0.9637, -0.9700, -0.9757, -0.9808, -0.9853,
|
|
89 -0.9892, -0.9925, -0.9952, -0.9973, -0.9988, -0.9997,
|
|
90 */
|
|
91
|
|
92 -1.0000, -0.9997, -0.9988, -0.9973, -0.9952, -0.9925,
|
|
93 -0.9892, -0.9853, -0.9808, -0.9757, -0.9701, -0.9638,
|
|
94 -0.9570, -0.9496, -0.9416, -0.9330, -0.9239, -0.9143,
|
|
95 -0.9041, -0.8933, -0.8820, -0.8702, -0.8578, -0.8449,
|
|
96 -0.8316, -0.8177, -0.8033, -0.7884, -0.7731, -0.7573,
|
|
97 -0.7411, -0.7244, -0.7072, -0.6897, -0.6717, -0.6533,
|
|
98 -0.6345, -0.6154, -0.5958, -0.5759, -0.5557, -0.5351,
|
|
99 -0.5142, -0.4930, -0.4715, -0.4498, -0.4277, -0.4054,
|
|
100 -0.3828, -0.3601, -0.3371, -0.3138, -0.2905, -0.2669,
|
|
101 -0.2432, -0.2193, -0.1953, -0.1711, -0.1469, -0.1226,
|
|
102 -0.0982, -0.0737, -0.0493, -0.0247};
|
|
103
|
|
104 #define WINSIDE 500
|
|
105 extern int blk_gwidth;
|
|
106 extern float blk_windgwidth;
|
|
107
|
|
108 void
|
|
109 inittrigtables()
|
|
110 {
|
|
111 Cos = Sin + 64;
|
|
112 blk_gwidth = 100000;
|
|
113 blk_windgwidth = ((float) WINSIDE) / blk_gwidth;
|
|
114 }
|