summaryrefslogtreecommitdiff
path: root/graphics/plasma-kmod/files/patch-plasma_saver.h
blob: 72b6508eeecefc2f2b7cdcc11af458dc80646dff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- plasma_saver.h.orig	2001-01-24 11:57:49.000000000 -0500
+++ plasma_saver.h	2012-04-18 17:24:25.000000000 -0400
@@ -29,30 +29,32 @@
  * $FreeBSD$
  */
 
-#define PI		3.14159265358979323846
-#define TWO_PI		6.28318530717958647692
+#define	SCALE		1000000000LL
+#define	PI		3141592654LL
+#define	TWO_PI		6283185307LL
 
 /* Precomputed values of sin(x), 0<=x<=TWO_PI */
 
-float aprsinv[] = 	{	0.0000, 0.0698, 0.1392, 0.2079, 0.2756,
-				0.3420,	0.4067, 0.4695, 0.5299, 0.5878,
-				0.6428,	0.6947, 0.7431, 0.7880, 0.8290,
-				0.8660,	0.8988, 0.9272, 0.9511, 0.9703,
-				0.9848,	0.9945, 0.9994, 0.9994, 0.9945,
-				0.9848,	0.9703, 0.9511, 0.9272, 0.8988,
-				0.8660,	0.8290, 0.7880, 0.7431, 0.6947,
-				0.6428,	0.5878, 0.5299, 0.4695, 0.4067,
-				0.3420,	0.2756, 0.2079, 0.1392, 0.0698,
-				0.0000,	-0.0698, -0.1392, -0.2079, -0.2756,
-				-0.3420,-0.4067, -0.4695, -0.5299, -0.5878,
-				-0.6428,-0.6947, -0.7431, -0.7880, -0.8290,
-				-0.8660,-0.8988, -0.9272, -0.9511, -0.9703,
-				-0.9848,-0.9945, -0.9994, -0.9994, -0.9945,
-				-0.9848,-0.9703, -0.9511, -0.9272, -0.8988,
-				-0.8660,-0.8290, -0.7880, -0.7431, -0.6947,
-				-0.6428,-0.5878, -0.5299, -0.4695, -0.4067,
-				-0.3420,-0.2756, -0.2079, -0.1392, -0.0698
-			};
+int aprsinv[] = {
+	0, 69756474, 139173101, 207911691, 275637356,
+	342020143, 406736643, 469471563, 529919264, 587785252,
+	642787610, 694658370, 743144825, 788010754, 829037573,
+	866025404, 898794046, 927183855, 951056516, 970295726,
+	984807753, 994521895, 999390827, 999390827, 994521895,
+	984807753, 970295726, 951056516, 927183855, 898794046,
+	866025404, 829037573, 788010754, 743144825, 694658370,
+	642787610, 587785252, 529919264, 469471563, 406736643,
+	342020143, 275637356, 207911691, 139173101, 69756474,
+	0, -69756474, -139173101, -207911691, -275637356,
+	-342020143, -406736643, -469471563, -529919264, -587785252,
+	-642787610, -694658370, -743144825, -788010754, -829037573,
+	-866025404, -898794046, -927183855, -951056516, -970295726,
+	-984807753, -994521895, -999390827, -999390827, -994521895,
+	-984807753, -970295726, -951056516, -927183855, -898794046,
+	-866025404, -829037573, -788010754, -743144825, -694658370,
+	-642787610, -587785252, -529919264, -469471563, -406736643,
+	-342020143, -275637356, -207911691, -139173101, -69756474
+};
 
 u_char plasma_pal[768] = {
 		0,	0,	0,