/*============================================================================*
* Local *
*============================================================================*/
-/** @cond internal */
-/*
- * In the range [-pi pi]
- * (4/pi)*x - ((4/(pi*pi))*x*abs(x))
- * http://www.devmaster.net/forums/showthread.php?t=5784
- */
-#define EXTRA_PRECISION
-static inline double
- _sin(double x)
-{
- const double B = 4/M_PI;
- const double C = -4/(M_PI*M_PI);
-
- double y = (B * x) + (C * x * fabs(x));
-
-#ifdef EXTRA_PRECISION
- // const float Q = 0.775;
- const double P = 0.225;
-
- y = P * (y * fabs(y) - y) + y; // Q * y + P * y * abs(y)
-#endif
- return y;
-}
-
-static inline double
-_cos(double x)
-{
- x += M_PI_2;
-
- if (x > M_PI) // Original x > pi/2
- {
- x -= 2 * M_PI; // Wrap: cos(x) = cos(x - 2 pi)
- }
-
- return _sin(x);
-}
-/** @endcond */
/*============================================================================*
* API *
free(it);
}
-static inline Eina_Iterator *
-_efl_ui_table_item_iterator_create(Eo *obj, Eina_Inlist *list)
-{
- Table_Item_Iterator *it;
-
- it = calloc(1, sizeof(*it));
- if (!it) return NULL;
-
- EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
-
- it->object = obj;
- it->cur = list;
-
- it->iterator.version = EINA_ITERATOR_VERSION;
- it->iterator.next = FUNC_ITERATOR_NEXT(_efl_ui_table_item_iterator_next);
- it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(
- _efl_ui_table_item_iterator_get_container);
- it->iterator.free = FUNC_ITERATOR_FREE(_efl_ui_table_item_iterator_free);
-
- return &it->iterator;
-}
-
EOLIAN static Eina_Iterator *
_efl_ui_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Table_Data *pd)
{
return 180 * rad / M_PI;
}
-static inline double
-_deg_to_rad(double angle)
-{
- return angle / 180 * M_PI;
-}
-
static void
_segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, double dt, double dist,
int w1, int cmp, Evas_Map *map, Eina_Bezier bezier,
/**
* @internal
- * Advance p_buff to point after the end of the string. It's used with the
- * @ref escaped_strings[] variable.
- *
- * @param p_buff the pointer to the current string.
- */
-static inline void
-_escaped_advance_after_end_of_string(const char **p_buf)
-{
- while (**p_buf != 0) (*p_buf)++;
- (*p_buf)++;
-}
-
-/**
- * @internal
- * Advance p_buff to point after the end of the string. It's used with the
- * @ref escaped_strings[] variable. Also chec if matches.
- * FIXME: doc.
- *
- * @param p_buff the pointer to the current string.
- */
-static inline int
-_escaped_is_eq_and_advance(const char *s, const char *s_end,
- const char **p_m, const char *m_end)
-{
- Eina_Bool reached_end;
- for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++)
- {
- if (*s != **p_m)
- {
- _escaped_advance_after_end_of_string(p_m);
- return 0;
- }
- }
-
- reached_end = !**p_m;
- if (*p_m < m_end)
- _escaped_advance_after_end_of_string(p_m);
-
- return ((s == s_end) && reached_end);
-}
-
-
-/**
- * @internal
*
* @param s the escape string to search for its index
* @param s_len length of s string