diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index 7f8f4ef..aed264b 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -6,8 +6,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: arduino/arduino-lint-action@v1 + - uses: actions/checkout@v6 + - uses: arduino/arduino-lint-action@v2 with: library-manager: update compliance: strict \ No newline at end of file diff --git a/.github/workflows/arduino_test_runner.yml b/.github/workflows/arduino_test_runner.yml index dbd0ce7..a2a5f07 100644 --- a/.github/workflows/arduino_test_runner.yml +++ b/.github/workflows/arduino_test_runner.yml @@ -6,9 +6,8 @@ jobs: runTest: runs-on: ubuntu-latest timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: ruby-version: 2.6 diff --git a/.github/workflows/jsoncheck.yml b/.github/workflows/jsoncheck.yml index 1cbb5e2..2c52dc7 100644 --- a/.github/workflows/jsoncheck.yml +++ b/.github/workflows/jsoncheck.yml @@ -5,13 +5,15 @@ on: paths: - '**.json' pull_request: + paths: + - '**.json' jobs: test: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: json-syntax-check uses: limitusus/json-syntax-check@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5d085..b5b4fb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [0.3.3] - 2025-03-23 +## [0.3.5] - 2026-01-15 +- update GitHub actions +- minor edits + +## [0.3.4] - 2025-03-23 - fix #28, prevent promotion of constants to double. Kudos to Harrison3000 - replace M_PI by a const float _PI_ to prevent promotion. - update examples - update readme.md (minor) - minor edits - ## [0.3.3] - 2023-11-02 - update readme.md - update keywords.txt @@ -102,17 +105,15 @@ is added, as it uses the same **isintable16\[\]** interpolation table. There is no **atan()** or **atan2()** replacement. - ## [0.1.4] - 2020-09-08 - rewrite itan() -- cleanup +- clean up - examples The library (0.1.4) provides an **itan()** which improved accuracy upon the (0.1.3) version and performance for the ESP32. Performance on AVR (UNO) is still an issue, accuracy is OK. - ## [0.1.3] - 2020-09-07 - initial release. diff --git a/FastTrig.cpp b/FastTrig.cpp index e020167..c907254 100644 --- a/FastTrig.cpp +++ b/FastTrig.cpp @@ -1,7 +1,7 @@ // // FILE: FastTrig.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.3.4 +// VERSION: 0.3.5 // PURPOSE: Arduino library for a faster approximation of sin() and cos() // DATE: 2011-08-18 // URL: https://github.com/RobTillaart/FastTrig diff --git a/FastTrig.h b/FastTrig.h index af9597a..74c87b0 100644 --- a/FastTrig.h +++ b/FastTrig.h @@ -2,7 +2,7 @@ // // FILE: FastTrig.h // AUTHOR: Rob Tillaart -// VERSION: 0.3.4 +// VERSION: 0.3.5 // PURPOSE: Arduino library for a faster approximation of sin() and cos() // DATE: 2011-08-18 // URL: https://github.com/RobTillaart/FastTrig @@ -18,7 +18,7 @@ #endif -#define FAST_TRIG_LIB_VERSION (F("0.3.4")) +#define FAST_TRIG_LIB_VERSION (F("0.3.5")) #ifdef __cplusplus diff --git a/LICENSE b/LICENSE index 35dd82b..6aad57a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2011-2025 Rob Tillaart +Copyright (c) 2011-2026 Rob Tillaart Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3325eef..c97f623 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,14 @@ between **isin(int(x))** and **isin(int(x+1))**. Of course this introduces an error but the error is small and performance is still quite fast (which was the goal). +Feedback as always is welcome. + ### Related +- https://github.com/RobTillaart/fastTrig - https://github.com/RobTillaart/fast_math +- https://github.com/RobTillaart/printHelpers a.o. print floats in scientific notation - https://github.com/RobTillaart?tab=repositories&q=math diff --git a/examples/fastTrig_atan_performance/fastTrig_atan_performance.ino b/examples/fastTrig_atan_performance/fastTrig_atan_performance.ino index 3aebb63..739ea37 100644 --- a/examples/fastTrig_atan_performance/fastTrig_atan_performance.ino +++ b/examples/fastTrig_atan_performance/fastTrig_atan_performance.ino @@ -1,6 +1,5 @@ // FILE: fastTrig_atan_performance.ino // AUTHOR: Rob Tillaart -// DATE: 2022-12-05 // PURPOSE: performance and accuracy measurement // URL: https://github.com/RobTillaart/FastTrig diff --git a/examples/fastTrig_generate_tables/fastTrig_generate_tables.ino b/examples/fastTrig_generate_tables/fastTrig_generate_tables.ino index 668b694..93b3355 100644 --- a/examples/fastTrig_generate_tables/fastTrig_generate_tables.ino +++ b/examples/fastTrig_generate_tables/fastTrig_generate_tables.ino @@ -3,7 +3,6 @@ // AUTHOR: Rob Tillaart // PURPOSE: generate look up tables for goniometry functions (and others) // these are not optimized for interpolation. -// DATE: 2020-09-08 // URL: https://github.com/RobTillaart/FastTrig // TODO @@ -20,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); diff --git a/examples/fastTrig_hypot_accuracy/fastTrig_hypot_accuracy.ino b/examples/fastTrig_hypot_accuracy/fastTrig_hypot_accuracy.ino index d4e6b55..dc45a00 100644 --- a/examples/fastTrig_hypot_accuracy/fastTrig_hypot_accuracy.ino +++ b/examples/fastTrig_hypot_accuracy/fastTrig_hypot_accuracy.ino @@ -1,6 +1,5 @@ // FILE: fastTrig_hypot_accuracy.ino // AUTHOR: Rob Tillaart -// DATE: 2022-12-05 // PURPOSE: performance and accuracy measurement // URL: https://github.com/RobTillaart/FastTrig @@ -20,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); delay(10); diff --git a/examples/fastTrig_hypot_performance/fastTrig_hypot_performance.ino b/examples/fastTrig_hypot_performance/fastTrig_hypot_performance.ino index ad0ccd6..110047c 100644 --- a/examples/fastTrig_hypot_performance/fastTrig_hypot_performance.ino +++ b/examples/fastTrig_hypot_performance/fastTrig_hypot_performance.ino @@ -1,6 +1,5 @@ // FILE: fastTrig_hypot_performance.ino // AUTHOR: Rob Tillaart -// DATE: 2022-12-05 // PURPOSE: performance and accuracy measurement // URL: https://github.com/RobTillaart/FastTrig @@ -20,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); delay(10); diff --git a/examples/fastTrig_isincos/fastTrig_isincos.ino b/examples/fastTrig_isincos/fastTrig_isincos.ino index f43237b..71afae9 100644 --- a/examples/fastTrig_isincos/fastTrig_isincos.ino +++ b/examples/fastTrig_isincos/fastTrig_isincos.ino @@ -1,6 +1,5 @@ // FILE: isincos.ino // AUTHOR: Rob Tillaart -// DATE: 2022-12-09 // PURPOSE: R&D // URL: https://github.com/RobTillaart/FastTrig @@ -20,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); delay(10); diff --git a/examples/fastTrig_isincos256/fastTrig_isincos256.ino b/examples/fastTrig_isincos256/fastTrig_isincos256.ino index 7ef73c0..35563a1 100644 --- a/examples/fastTrig_isincos256/fastTrig_isincos256.ino +++ b/examples/fastTrig_isincos256/fastTrig_isincos256.ino @@ -1,6 +1,5 @@ // FILE: fastTrig_isincos256.ino // AUTHOR: Rob Tillaart -// DATE: 2022-12-09 // PURPOSE: R&D // URL: https://github.com/RobTillaart/FastTrig @@ -20,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); delay(10); diff --git a/examples/fastTrig_optimize/fastTrig_optimize.ino b/examples/fastTrig_optimize/fastTrig_optimize.ino index 9cb6db0..91795d0 100644 --- a/examples/fastTrig_optimize/fastTrig_optimize.ino +++ b/examples/fastTrig_optimize/fastTrig_optimize.ino @@ -2,7 +2,6 @@ // FILE: fastTrig_optimize.ino // AUTHOR: Rob Tillaart // PURPOSE: sketch to optimize the table for interpolation -// DATE: 2020-09-06 // URL: https://github.com/RobTillaart/FastTrig // WARNING TAKES A LOT OF TIME ON 16 MHz @@ -29,7 +28,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); diff --git a/examples/fastTrig_playground/fastTrig_playground.ino b/examples/fastTrig_playground/fastTrig_playground.ino index 09d4ffe..1b698ec 100644 --- a/examples/fastTrig_playground/fastTrig_playground.ino +++ b/examples/fastTrig_playground/fastTrig_playground.ino @@ -2,7 +2,6 @@ // FILE: fastTrig_playground.ino // AUTHOR: Rob Tillaart // PURPOSE: playground to play with tables. -// DATE: 2020-09-08 // URL: https://github.com/RobTillaart/FastTrig // NOTES @@ -80,6 +79,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); + Serial.println("FastTrig"); Serial.println(); test_accuracy(); diff --git a/examples/fastTrig_plot/fastTrig_plot.ino b/examples/fastTrig_plot/fastTrig_plot.ino index 71ce034..afb6944 100644 --- a/examples/fastTrig_plot/fastTrig_plot.ino +++ b/examples/fastTrig_plot/fastTrig_plot.ino @@ -2,7 +2,6 @@ // FILE: fastTrig_plot.ino // AUTHOR: Rob Tillaart // PURPOSE: testing the fastTrigonio functions -// DATE: 2020-09-07 // URL: https://github.com/RobTillaart/FastTrig // sketch to visually compare tan(x) and itan(x) @@ -22,7 +21,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); diff --git a/examples/fastTrig_test1/fastTrig_test1.ino b/examples/fastTrig_test1/fastTrig_test1.ino index 91e5d8b..7433c0b 100644 --- a/examples/fastTrig_test1/fastTrig_test1.ino +++ b/examples/fastTrig_test1/fastTrig_test1.ino @@ -2,8 +2,6 @@ // FILE: fastTrig_test1.ino // AUTHOR: Rob Tillaart // PURPOSE: testing the fastTrigonio functions -// DATE: 2020-08-30 -// (c) : MIT // URL: https://github.com/RobTillaart/FastTrig @@ -21,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); diff --git a/examples/fastTrig_test2/fastTrig_test2.ino b/examples/fastTrig_test2/fastTrig_test2.ino index 8c32d2f..e6c9d58 100644 --- a/examples/fastTrig_test2/fastTrig_test2.ino +++ b/examples/fastTrig_test2/fastTrig_test2.ino @@ -2,8 +2,6 @@ // FILE: fastTrig_test2.ino // AUTHOR: Rob Tillaart // PURPOSE: testing the itan functions -// DATE: 2021-08-10 -// (c) : MIT // URL: https://github.com/RobTillaart/FastTrig @@ -21,7 +19,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); diff --git a/examples/fastTrig_test_arc/fastTrig_test_arc.ino b/examples/fastTrig_test_arc/fastTrig_test_arc.ino index 5ad22f8..5936779 100644 --- a/examples/fastTrig_test_arc/fastTrig_test_arc.ino +++ b/examples/fastTrig_test_arc/fastTrig_test_arc.ino @@ -3,7 +3,6 @@ // AUTHOR: Rob Tillaart // VERSION: 0.1.1 // PURPOSE: testing the fastTrigonio functions -// DATE: 2020-09-09 // URL: https://github.com/RobTillaart/FastTrig @@ -22,7 +21,7 @@ void setup() while (!Serial); Serial.println(); Serial.println(__FILE__); - Serial.println("FAST_TRIG_LIB_VERSION: "); + Serial.print("FAST_TRIG_LIB_VERSION: "); Serial.println(FAST_TRIG_LIB_VERSION); Serial.println(); diff --git a/library.json b/library.json index 4295d86..91ae138 100644 --- a/library.json +++ b/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/FastTrig" }, - "version": "0.3.4", + "version": "0.3.5", "license": "MIT", "frameworks": "*", "platforms": "*", diff --git a/library.properties b/library.properties index 6cb75e3..bf500c6 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=FastTrig -version=0.3.4 +version=0.3.5 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library with interpolated lookup for sin(), cos(), tan(), atan2() and more.