# lv_vg_lite_math.h (/api/draw/vg_lite/lv_vg_lite_math_h)



<ApiSummary functions="3" macros="14" />

Functions [#functions]

<ApiMember kind="function" name="math_zero" file="draw/vg_lite/lv_vg_lite_math.h" line="54" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L54">
  math_zero [#math_zero]

  ```c title=" " lineNumbers=1
  static bool math_zero(float a)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name | Type    |
  | ---- | ------- |
  | `a`  | `float` |
</ApiMember>

<ApiMember kind="function" name="math_equal" file="draw/vg_lite/lv_vg_lite_math.h" line="59" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L59">
  math_equal [#math_equal]

  ```c title=" " lineNumbers=1
  static bool math_equal(float a, float b)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name | Type    |
  | ---- | ------- |
  | `a`  | `float` |
  | `b`  | `float` |
</ApiMember>

<ApiMember kind="function" name="math_fast_inv_sqrtf" file="draw/vg_lite/lv_vg_lite_math.h" line="64" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L64">
  math_fast_inv_sqrtf [#math_fast_inv_sqrtf]

  ```c title=" " lineNumbers=1
  float math_fast_inv_sqrtf(float number)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name     | Type    |
  | -------- | ------- |
  | `number` | `float` |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="MATH_PI" file="draw/vg_lite/lv_vg_lite_math.h" line="29" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L29">
  MATH_PI [#math_pi]

  ```c title=" " lineNumbers=1
  #define MATH_PI 3.14159265358979323846f
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_HALF_PI" file="draw/vg_lite/lv_vg_lite_math.h" line="30" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L30">
  MATH_HALF_PI [#math_half_pi]

  ```c title=" " lineNumbers=1
  #define MATH_HALF_PI 1.57079632679489661923f
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_TWO_PI" file="draw/vg_lite/lv_vg_lite_math.h" line="31" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L31">
  MATH_TWO_PI [#math_two_pi]

  ```c title=" " lineNumbers=1
  #define MATH_TWO_PI 6.28318530717958647692f
  ```
</ApiMember>

<ApiMember kind="macro" name="DEG_TO_RAD" file="draw/vg_lite/lv_vg_lite_math.h" line="32" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L32">
  DEG_TO_RAD [#deg_to_rad]

  ```c title=" " lineNumbers=1
  #define DEG_TO_RAD 0.017453292519943295769236907684886f
  ```
</ApiMember>

<ApiMember kind="macro" name="RAD_TO_DEG" file="draw/vg_lite/lv_vg_lite_math.h" line="33" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L33">
  RAD_TO_DEG [#rad_to_deg]

  ```c title=" " lineNumbers=1
  #define RAD_TO_DEG 57.295779513082320876798154814105f
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_TANF" file="draw/vg_lite/lv_vg_lite_math.h" line="35" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L35">
  MATH_TANF [#math_tanf]

  ```c title=" " lineNumbers=1
  #define MATH_TANF(x) \
      tanf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_SINF" file="draw/vg_lite/lv_vg_lite_math.h" line="36" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L36">
  MATH_SINF [#math_sinf]

  ```c title=" " lineNumbers=1
  #define MATH_SINF(x) \
      sinf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_COSF" file="draw/vg_lite/lv_vg_lite_math.h" line="37" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L37">
  MATH_COSF [#math_cosf]

  ```c title=" " lineNumbers=1
  #define MATH_COSF(x) \
      cosf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_ASINF" file="draw/vg_lite/lv_vg_lite_math.h" line="38" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L38">
  MATH_ASINF [#math_asinf]

  ```c title=" " lineNumbers=1
  #define MATH_ASINF(x) \
      asinf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_ACOSF" file="draw/vg_lite/lv_vg_lite_math.h" line="39" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L39">
  MATH_ACOSF [#math_acosf]

  ```c title=" " lineNumbers=1
  #define MATH_ACOSF(x) \
      acosf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_FABSF" file="draw/vg_lite/lv_vg_lite_math.h" line="40" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L40">
  MATH_FABSF [#math_fabsf]

  ```c title=" " lineNumbers=1
  #define MATH_FABSF(x) \
      fabsf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_SQRTF" file="draw/vg_lite/lv_vg_lite_math.h" line="41" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L41">
  MATH_SQRTF [#math_sqrtf]

  ```c title=" " lineNumbers=1
  #define MATH_SQRTF(x) \
      sqrtf(x)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_RADIANS" file="draw/vg_lite/lv_vg_lite_math.h" line="43" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L43">
  MATH_RADIANS [#math_radians]

  ```c title=" " lineNumbers=1
  #define MATH_RADIANS(deg) \
      ((deg) * DEG_TO_RAD)
  ```
</ApiMember>

<ApiMember kind="macro" name="MATH_DEGREES" file="draw/vg_lite/lv_vg_lite_math.h" line="44" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/vg_lite/lv_vg_lite_math.h#L44">
  MATH_DEGREES [#math_degrees]

  ```c title=" " lineNumbers=1
  #define MATH_DEGREES(rad) \
      ((rad) * RAD_TO_DEG)
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;math.h&#x22;, &#x22;stdbool.h&#x22;, &#x22;float.h&#x22;]" transitiveIncludes="[&#x22;lv_conf_kconfig.h&#x22;]" />
