7#if FL_HAS_INCLUDE(<cmath>)
8 #define FASTLED_HAS_EXP 1
10#elif FL_HAS_INCLUDE(<math.h>)
11 #define FASTLED_HAS_EXP 1
14 #define FASTLED_HAS_EXP 0
25template <
typename T>
inline T
floor(T value) {
27 return static_cast<T
>(
static_cast<int>(value));
29 return static_cast<T
>(
::floor(
static_cast<float>(value)));
32template <
typename T>
inline T
ceil(T value) {
34 return static_cast<T
>(
static_cast<int>(value));
36 return static_cast<T
>(
::ceil(
static_cast<float>(value)));
40template <
typename T>
inline T
exp(T value) {
42 return static_cast<T
>(
::exp(
static_cast<double>(value)));
47 double x =
static_cast<double>(value);
49 return static_cast<T
>(22026.465794806718);
51 return static_cast<T
>(0.0000453999297625);
55 for (
int i = 1; i < 10; ++i) {
59 return static_cast<T
>(
result);
66 return static_cast<int>((value >
static_cast<float>(
static_cast<int>(value)))
67 ?
static_cast<int>(value) + 1
68 :
static_cast<int>(value));
Result type for promise operations.
constexpr int ceil_constexpr(float value)