mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
49 lines
819 B
C
49 lines
819 B
C
/**
|
|
* @file lv_trig.h
|
|
* Basic trigonometric integer functions
|
|
*/
|
|
|
|
#ifndef LV_TRIGO_H
|
|
#define LV_TRIGO_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
/*********************
|
|
* INCLUDES
|
|
*********************/
|
|
#include <stdint.h>
|
|
|
|
/*********************
|
|
* DEFINES
|
|
*********************/
|
|
#define LV_TRIGO_SIN_MAX 32767
|
|
#define LV_TRIGO_SHIFT 15 /* >> LV_TRIGO_SHIFT to normalize*/
|
|
|
|
/**********************
|
|
* TYPEDEFS
|
|
**********************/
|
|
|
|
/**********************
|
|
* GLOBAL PROTOTYPES
|
|
**********************/
|
|
|
|
/**
|
|
* Return with sinus of an angle
|
|
* @param angle
|
|
* @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
|
|
*/
|
|
int16_t lv_trigo_sin(int16_t angle);
|
|
|
|
/**********************
|
|
* MACROS
|
|
**********************/
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif
|