Hello, I wanted to write some tests for ecore_animator and while going through the functionality of ecore_animator_pos_map I noticed some inconsistencies.
Here's how I *think* this function should behave: The docs say ecore_animator_pos_map() "maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve." It "makes an input position (0.0 to 1.0) and maps to a new position (normally between 0.0 and 1.0, but it may go above/below 0.0 or 1.0 to show that it has "overshot" the mark) using some interpolation (mapping) algorithm." This means we can safely assume that the input is always between 0.0 and 1.0. Out-of-range values can be clamped to the min/max (and they are in the code). Now the return value of that function could be anything... It could even be less than 0.0 or more than 1.0. This is okay, but what is not explicitly stated (and which should be a requirement) is that pos_map(0.0) == 0.0 and pos_map(1.0) == 1.0 should hold true for any kind of transformation. We always want to start at the beginning and we always want to stop at the end... While writing the tests I found that using ECORE_POS_MAP_ACCELERATE pos_map(1.0) = 0.996982. Decelerate is wrong at 0.0 and sinusoidal also does not finish at 1.0. Linear is fine and I haven't tried the others yet. When moving 1000 pixels across the screen that error already amounts to 3 pixels so this should be significant. I traced that back to the eina_fp math (and maybe I should start by writing tests for that...). When using floating point functions from math.h the results were correct. I assume that eina_fp was/is used to improve speed on low-end machines? Does it still make sense to use that in this day and age as a default? Regards, Daniel ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel