Browse Source

testpen: don't include math.h

Anonymous Maarten 1 year ago
parent
commit
e5812a9fd2
1 changed files with 1 additions and 3 deletions
  1. 1 3
      test/testpen.c

+ 1 - 3
test/testpen.c

@@ -19,11 +19,9 @@
   3. This notice may not be removed or altered from any source distribution.
 */
 
-#include <math.h>
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_main.h>
 #include <SDL3/SDL_test.h>
-#include <SDL3/SDL_test_common.h>
 
 #define WIDTH  1600
 #define HEIGHT 1200
@@ -158,7 +156,7 @@ static void DrawScreen(SDL_Renderer *renderer)
     SDL_RenderLine(renderer, X, Y, endx - (ydelta * last_pressure / 3.0f), endy + (xdelta * last_pressure / 3.0f));
 
     /* If tilt is very small (or zero, for pens that don't have tilt), add some extra lines, rotated by the current rotation value */
-    if (ALWAYS_SHOW_PRESSURE_BOX || (SDL_fabs(tilt_vec_x) < 0.2f && SDL_fabs(tilt_vec_y) < 0.2f)) {
+    if (ALWAYS_SHOW_PRESSURE_BOX || (SDL_fabsf(tilt_vec_x) < 0.2f && SDL_fabsf(tilt_vec_y) < 0.2f)) {
         int rot;
         float pressure = last_pressure * 80.0f;