Home
last modified time | relevance | path

Searched refs:min_in (Results 1 – 2 of 2) sorted by relevance

/lvgl-latest/src/misc/
Dlv_math.c236 int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out) in lv_map() argument
238 if(max_in >= min_in && x >= max_in) return max_out; in lv_map()
239 if(max_in >= min_in && x <= min_in) return min_out; in lv_map()
241 if(max_in <= min_in && x <= max_in) return max_out; in lv_map()
242 if(max_in <= min_in && x >= min_in) return min_out; in lv_map()
251 int32_t delta_in = max_in - min_in; in lv_map()
254 return ((x - min_in) * delta_out) / delta_in + min_out; in lv_map()
Dlv_math.h108 int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out);