lib/system_identification/signal_generator: change functions to inline functions for optimization

This commit is contained in:
enesavcu 2024-01-26 17:07:49 +03:00 committed by GitHub
parent deed375579
commit 74d43c2fee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@
namespace signal_generator
{
float getLinearSineSweep(float f_start, float f_end, float duration, float t)
inline float getLinearSineSweep(float f_start, float f_end, float duration, float t)
{
if (t > duration) {
return 0.f;
@ -52,7 +52,7 @@ float getLinearSineSweep(float f_start, float f_end, float duration, float t)
return sinf(w_start * t + 0.5f * (w_end - w_start) * t * t / duration);
}
float getLogSineSweep(float f_start, float f_end, float duration, float t)
inline float getLogSineSweep(float f_start, float f_end, float duration, float t)
{
if (t > duration) {
return 0.f;