From 88acb54241f9b7944374e87c1c2639bf9ed825d0 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 17 Jan 2026 14:08:11 +0100 Subject: [PATCH] some more attributes for better optimization by the compiler --- wled00/fcn_declare.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index 3f14123e..92d40c39 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -559,9 +559,9 @@ inline uint8_t cos8_t(uint8_t theta) { //float sin_t(float phi); //float tan_t(float x); -float sin_approx(float theta); // uses integer math (converted to float), accuracy +/-0.0015 (compared to sinf()) -float cos_approx(float theta); -float tan_approx(float x); +float __attribute__((pure)) sin_approx(float theta); // uses integer math (converted to float), accuracy +/-0.0015 (compared to sinf()) +float __attribute__((pure)) cos_approx(float theta); +float __attribute__((pure)) tan_approx(float x); #if defined(WLED_USE_UNREAL_MATH) float atan2_t(float y, float x); float acos_t(float x);