1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /**
- * @file math_base.h
- *
- */
- #ifndef LV_MATH_H
- #define LV_MATH_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*********************
- * INCLUDES
- *********************/
- #include <stdint.h>
- /*********************
- * DEFINES
- *********************/
- #define LV_MATH_MIN(a,b) (a<b?a:b)
- #define LV_MATH_MAX(a,b) (a>b?a:b)
- #define LV_MATH_ABS(x) ((x)>0?(x):(-(x)))
- /**********************
- * TYPEDEFS
- **********************/
- /**********************
- * GLOBAL PROTOTYPES
- **********************/
- /**
- * Convert a number to string
- * @param num a number
- * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements)
- * @return same as `buf` (just for convenience)
- */
- char * lv_math_num_to_str(int32_t num, char * buf);
- /**********************
- * MACROS
- **********************/
- #ifdef __cplusplus
- } /* extern "C" */
- #endif
- #endif
|