From 0ed868d97b40116ae1fc260e0174c96455a727c0 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Tue, 14 Jun 2016 20:52:51 -0700 Subject: [PATCH] SITL: compiler warning, comparing float to 0 --- libraries/SITL/SIM_Aircraft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SITL/SIM_Aircraft.cpp b/libraries/SITL/SIM_Aircraft.cpp index 049d3e9e4d..95d951ff83 100644 --- a/libraries/SITL/SIM_Aircraft.cpp +++ b/libraries/SITL/SIM_Aircraft.cpp @@ -244,7 +244,7 @@ double Aircraft::rand_normal(double mean, double stddev) r = x*x + y*y; } - while (r == 0.0 || r > 1.0); + while (is_zero(r) || r > 1.0); { double d = sqrt(-2.0*log(r)/r); double n1 = x*d;