Lines Matching full:diff
31 static int32_t elastic_diff(lv_obj_t * scroll_obj, int32_t diff, int32_t scroll_start, int32_t scro…
641 static int32_t elastic_diff(lv_obj_t * scroll_obj, int32_t diff, int32_t scroll_start, int32_t scro… in elastic_diff() argument
644 if(diff == 0) return 0; in elastic_diff()
650 …* make sure that `diff` will not cause the scroll to exceed the `start` or `end` boundary of the c… in elastic_diff()
654 const int32_t scroll_ended = diff > 0 ? scroll_start : scroll_end; in elastic_diff()
655 if(scroll_ended < 0) diff = 0; in elastic_diff()
656 else if(scroll_ended - diff < 0) diff = scroll_ended; in elastic_diff()
664 /*Without snapping just scale down the diff when scrolled out*/ in elastic_diff()
668 if(diff < 0) diff -= ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
669 if(diff > 0) diff += ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
670 return diff / ELASTIC_SLOWNESS_FACTOR; in elastic_diff()
673 return diff; in elastic_diff()
685 if(diff < 0) diff -= ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
686 if(diff > 0) diff += ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
687 return diff / ELASTIC_SLOWNESS_FACTOR; in elastic_diff()
690 return diff; in elastic_diff()
694 return diff; in elastic_diff()