testpen: don't include math.h

This commit is contained in:
Anonymous Maarten 2024-03-16 19:52:37 +01:00
parent 2f13f66c71
commit e5812a9fd2

View File

@ -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;