lv_nanovg_math.h
API reference for lv_nanovg_math.h
Summary
Functions
draw/nanovg/lv_nanovg_math.h:59function
nvg_math_is_zero
Check if the floating point number is zero
static bool nvg_math_is_zero(float a)| Name | Type | Description |
|---|---|---|
a | float | the number to check |
Returns: bool — true if the number is zero, false otherwise
draw/nanovg/lv_nanovg_math.h:70function
nvg_math_is_equal
Check if two floating point numbers are equal
static bool nvg_math_is_equal(float a, float b)| Name | Type | Description |
|---|---|---|
a | float | the first number |
b | float | the second number |
Returns: bool — true if the numbers are equal, false otherwise
draw/nanovg/lv_nanovg_math.h:80function
nvg_math_inv_sqrtf
Calculate the inverse square root (1/sqrt(x))
static float nvg_math_inv_sqrtf(float number)| Name | Type | Description |
|---|---|---|
number | float | the input number |
Returns: float — the inverse square root
Macros
NVG_MATH_PI
#define NVG_MATH_PI 3.14159265358979323846fNVG_MATH_HALF_PI
#define NVG_MATH_HALF_PI 1.57079632679489661923fNVG_MATH_TWO_PI
#define NVG_MATH_TWO_PI 6.28318530717958647692fNVG_DEG_TO_RAD
#define NVG_DEG_TO_RAD 0.017453292519943295769236907684886fNVG_RAD_TO_DEG
#define NVG_RAD_TO_DEG 57.295779513082320876798154814105fNVG_MATH_TANF
#define NVG_MATH_TANF(x) \
tanf(x)NVG_MATH_SINF
#define NVG_MATH_SINF(x) \
sinf(x)NVG_MATH_COSF
#define NVG_MATH_COSF(x) \
cosf(x)NVG_MATH_ASINF
#define NVG_MATH_ASINF(x) \
asinf(x)NVG_MATH_ACOSF
#define NVG_MATH_ACOSF(x) \
acosf(x)NVG_MATH_FABSF
#define NVG_MATH_FABSF(x) \
fabsf(x)NVG_MATH_SQRTF
#define NVG_MATH_SQRTF(x) \
sqrtf(x)NVG_MATH_RADIANS
#define NVG_MATH_RADIANS(deg) \
((deg) * NVG_DEG_TO_RAD)NVG_MATH_DEGREES
#define NVG_MATH_DEGREES(rad) \
((rad) * NVG_RAD_TO_DEG)Dependencies
lv_conf_internal.hmath.hstdbool.hfloat.h
Indirect dependencies
How is this guide?
Last updated on