summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_matrix.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-09-01 13:09:37 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-09-01 14:12:31 +0200
commit0817c49e753d0e6fc24a301bc697a3c669ec2603 (patch)
tree2869d9cec8522723b6f5f50854059ccfa20d4b15 /src/lib/eina/eina_matrix.c
parent5f73d130473e285d9d2a4ae4d61e6ba7ae4c41a2 (diff)
efl: remove unused functions
these are not used, if they are used again in the future, they can be get back via git.
Diffstat (limited to '')
-rw-r--r--src/lib/eina/eina_matrix.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/lib/eina/eina_matrix.c b/src/lib/eina/eina_matrix.c
index db3779b8d6..b82bca2e1d 100644
--- a/src/lib/eina/eina_matrix.c
+++ b/src/lib/eina/eina_matrix.c
@@ -62,43 +62,6 @@
62/*============================================================================* 62/*============================================================================*
63 * Local * 63 * Local *
64 *============================================================================*/ 64 *============================================================================*/
65/** @cond internal */
66/*
67 * In the range [-pi pi]
68 * (4/pi)*x - ((4/(pi*pi))*x*abs(x))
69 * http://www.devmaster.net/forums/showthread.php?t=5784
70 */
71#define EXTRA_PRECISION
72static inline double
73 _sin(double x)
74{
75 const double B = 4/M_PI;
76 const double C = -4/(M_PI*M_PI);
77
78 double y = (B * x) + (C * x * fabs(x));
79
80#ifdef EXTRA_PRECISION
81 // const float Q = 0.775;
82 const double P = 0.225;
83
84 y = P * (y * fabs(y) - y) + y; // Q * y + P * y * abs(y)
85#endif
86 return y;
87}
88
89static inline double
90_cos(double x)
91{
92 x += M_PI_2;
93
94 if (x > M_PI) // Original x > pi/2
95 {
96 x -= 2 * M_PI; // Wrap: cos(x) = cos(x - 2 pi)
97 }
98
99 return _sin(x);
100}
101/** @endcond */
102 65
103/*============================================================================* 66/*============================================================================*
104 * API * 67 * API *