mirror of
https://github.com/wled/WLED.git
synced 2025-07-12 13:26:33 +00:00
Temporary fix for inappropriate atan_t().
This commit is contained in:
parent
2fdbc88d8c
commit
39cd83b171
@ -1,6 +1,17 @@
|
|||||||
#include "src/dependencies/timezone/Timezone.h"
|
#include "src/dependencies/timezone/Timezone.h"
|
||||||
#include "wled.h"
|
#include "wled.h"
|
||||||
|
#ifndef WLED_USE_REAL_MATH
|
||||||
#include "wled_math.h"
|
#include "wled_math.h"
|
||||||
|
#else
|
||||||
|
#define sin_t sin
|
||||||
|
#define cos_t cos
|
||||||
|
#define tan_t tan
|
||||||
|
#define asin_t asin
|
||||||
|
#define acos_t acos
|
||||||
|
#define atan_t atan
|
||||||
|
#define fmod_t fmod
|
||||||
|
#define floor_t floor
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Acquires time from NTP server
|
* Acquires time from NTP server
|
||||||
|
@ -64,6 +64,7 @@ float asin_t(float x) {
|
|||||||
#define C ((HALF_PI/2) - A - B)
|
#define C ((HALF_PI/2) - A - B)
|
||||||
|
|
||||||
float atan_t(float x) {
|
float atan_t(float x) {
|
||||||
|
if (x>1) return atan(x);
|
||||||
float xx = x * x;
|
float xx = x * x;
|
||||||
return ((A*xx + B)*xx + C)*x;
|
return ((A*xx + B)*xx + C)*x;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user