mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
#include and use LV_MATH_ABS
This commit is contained in:
parent
372b133b18
commit
6df1fe190a
@ -7,6 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_color.h"
|
||||
#include "lv_math.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
@ -126,7 +127,7 @@ lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8)
|
||||
hsv.v = (100 * rgbMax) >> 10;
|
||||
|
||||
int32_t delta = rgbMax - rgbMin;
|
||||
if (abs(delta) < 3) {
|
||||
if (LV_MATH_ABS(delta) < 3) {
|
||||
hsv.h = 0;
|
||||
hsv.s = 0;
|
||||
return hsv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user