diff options
Diffstat (limited to 'web/dartboat_wasm.c')
-rw-r--r-- | web/dartboat_wasm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c index f8a076d..bc384dc 100644 --- a/web/dartboat_wasm.c +++ b/web/dartboat_wasm.c @@ -1,6 +1,7 @@ #include "checkouts.h" #include "comp.h" +#include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -448,8 +449,10 @@ EMSCRIPTEN_KEEPALIVE void set_delay(int delay) EMSCRIPTEN_KEEPALIVE void set_stdev(float hstdev, float vstdev) { - horizontal_stdev = hstdev; - vertical_stdev = vstdev; + if (!isnan(hstdev)) + horizontal_stdev = hstdev; + if (!isnan(vstdev)) + vertical_stdev = vstdev; } void init_boat() |