GY-63_MS5611/libraries/FastTrig/FastTrig.h

50 lines
928 B
C
Raw Normal View History

2021-01-29 06:31:58 -05:00
#pragma once
//
// FILE: FastTrig.h
// AUTHOR: Rob Tillaart
2022-04-15 10:43:05 -04:00
// VERSION: 0.1.10
2021-01-29 06:31:58 -05:00
// PURPOSE: Arduino library for a faster approximation of sin() and cos()
// DATE: 2011-08-18
// URL: https://github.com/RobTillaart/FastTrig
// https://forum.arduino.cc/index.php?topic=69723.0
2021-04-25 13:56:44 -04:00
2021-01-29 06:31:58 -05:00
#include "Arduino.h"
2022-04-15 10:43:05 -04:00
#define FAST_TRIG_LIB_VERSION (F("0.1.10"))
2021-01-29 06:31:58 -05:00
2022-04-15 10:43:05 -04:00
extern uint16_t isinTable16[];
extern uint8_t isinTable8[];
2021-12-18 07:14:58 -05:00
2021-01-29 06:31:58 -05:00
///////////////////////////////////////////////////////
//
// GONIO LOOKUP
//
2022-04-15 10:43:05 -04:00
float isin(float f);
2021-01-29 06:31:58 -05:00
2022-04-15 10:43:05 -04:00
float icos(float x);
2021-12-18 07:14:58 -05:00
2022-04-15 10:43:05 -04:00
float itan(float f);
2021-08-10 15:24:22 -04:00
2022-04-15 10:43:05 -04:00
// some problem at 0 but at least we have a icot(x) cotangent.
float icot(float f);
2021-08-10 15:24:22 -04:00
// missing function...
2022-04-15 10:43:05 -04:00
// float cot(float f);
2021-08-10 15:24:22 -04:00
2021-01-29 06:31:58 -05:00
///////////////////////////////////////////////////////
//
// INVERSE GONIO LOOKUP
//
2022-04-15 10:43:05 -04:00
float iasin(float f);
float iacos(float f);
// PLACEHOLDER no good implementation
float iatan(float f);
2021-01-29 06:31:58 -05:00
2021-12-18 07:14:58 -05:00
2021-01-29 06:31:58 -05:00
// -- END OF FILE --