use SDL's functions version inplace of libc version

This commit is contained in:
Sylvain 2021-11-21 22:30:48 +01:00 committed by Sam Lantinga
parent 35b7ce1893
commit d31251b014
46 changed files with 114 additions and 124 deletions

View file

@ -58,7 +58,7 @@ render(SDL_Renderer *renderer, int w, int h, double deltaTime)
ay * SDL_IPHONE_MAX_GFORCE / SINT16_MAX * GRAVITY_CONSTANT *
deltaMilliseconds;
speed = sqrt(shipData.vx * shipData.vx + shipData.vy * shipData.vy);
speed = SDL_sqrt(shipData.vx * shipData.vx + shipData.vy * shipData.vy);
if (speed > 0) {
/* compensate for friction */