Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
trigonometry.h
Go to the documentation of this file.
1
26#ifndef _TRIGONOMETRY_H_
27#define _TRIGONOMETRY_H_
28
29#include <stdint.h>
30
31extern const int16_t sin1024[91];
32extern const uint16_t tan1024[91];
33
34int16_t getSin1024(int16_t degree);
35int16_t getCos1024(int16_t degree);
36int32_t getTan1024(int16_t degree);
37int32_t cordicAtan2(int32_t x, int32_t y);
38int16_t getAtan2(int32_t y, int32_t x);
39
40#endif
int32_t getTan1024(int16_t degree)
Definition trigonometry.c:132
int16_t getCos1024(int16_t degree)
Definition trigonometry.c:94
const int16_t sin1024[91]
Definition trigonometry.c:21
int16_t getAtan2(int32_t y, int32_t x)
Calculate the angle of the line from the origin to (x, y), in degrees.
Definition trigonometry.c:300
int32_t cordicAtan2(int32_t x, int32_t y)
CORDIC approximation of arctan.
Definition trigonometry.c:171
const uint16_t tan1024[91]
Definition trigonometry.c:31
int16_t getSin1024(int16_t degree)
Definition trigonometry.c:56