Lines Matching refs:diff
31 static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_t scroll_start, lv_…
606 static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_t scroll_start, lv_… in elastic_diff() argument
659 if(snap != LV_SCROLL_SNAP_NONE && act_obj_point > snap_point) return diff; in elastic_diff()
662 if(diff < 0) diff -= ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
663 if(diff > 0) diff += ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
664 return diff / ELASTIC_SLOWNESS_FACTOR; in elastic_diff()
667 if(snap != LV_SCROLL_SNAP_NONE && act_obj_point < snap_point) return diff; in elastic_diff()
670 if(diff < 0) diff -= ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
671 if(diff > 0) diff += ELASTIC_SLOWNESS_FACTOR / 2; in elastic_diff()
672 return diff / ELASTIC_SLOWNESS_FACTOR; in elastic_diff()
677 if(scroll_end + diff < 0) diff = - scroll_end; in elastic_diff()
678 if(scroll_start - diff < 0) diff = scroll_start; in elastic_diff()
681 return diff; in elastic_diff()