From cb3687e6751ed298ecdec4b2f69a4da1f3c16a1a Mon Sep 17 00:00:00 2001 From: Rene Hopf Date: Mon, 3 Nov 2014 10:37:34 +0100 Subject: [PATCH] fix crash --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index f632c5a8..817254fc 100644 --- a/src/main.c +++ b/src/main.c @@ -188,14 +188,14 @@ float get_cmd(float periode){ pos = mod(pos); return(pos); case 3: // square - if(sin(freq * 2 * M_PI * time) > 0){ + if(sinf(freq * 2 * M_PI * time) > 0){ return(amp); } else{ return(-amp); } case 4: // sine - return(amp * sin(freq * 2 * M_PI * time)); + return(amp * sinf(freq * 2 * M_PI * time)); } return(0.0); }