Skip to content

Commit

Permalink
fix: deleted dead code in Cube example
Browse files Browse the repository at this point in the history
  • Loading branch information
klonyyy committed Sep 14, 2023
1 parent 015f3ef commit 35641e6
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions test/STMViewer_test/Core/Src/stm32g4xx_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,7 @@

/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
float factorial(int n) {
float fact = 1.0;
for (int i = 2; i <= n; ++i)
{
fact *= i;
}
return fact;
}

float approximateSin(float x, int terms)
{
float result = 0.0;
for (int n = 0; n < terms; ++n) {
float term = (powf(-1, n) * powf(x, 2 * n + 1)) / factorial(2 * n + 1);
result += term;
}
return result;
}
/* USER CODE END PFP */

/* Private user code ---------------------------------------------------------*/
Expand Down

0 comments on commit 35641e6

Please sign in to comment.