+ while (frac < 0)
+ {
+ frac += period;
+ n --;
+ }
+
+ Real px = frac + positions[0];
+ assert ( positions[0] <= px && px <= positions.top ());
+ int i=0;
+ for (; i < positions.size () - 1; i++)
+ {
+ if (positions[i] <= px && px <= positions[i+1])
+ break;