From dbfc0eb287adcfbb932c02722adbc8fa9e256777 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sat, 12 Jun 2004 11:37:47 +0000 Subject: [PATCH] Put the sqrt() back in. That was part of another attempt to optimize the code, but it hadn't fully matured yet. --- src/AIModel/AIThermal.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AIModel/AIThermal.cxx b/src/AIModel/AIThermal.cxx index 823781b8a..a8fd777b2 100644 --- a/src/AIModel/AIThermal.cxx +++ b/src/AIModel/AIThermal.cxx @@ -85,7 +85,7 @@ void FGAIThermal::Run(double dt) { // calculate range to target in feet and nautical miles double lat_range = fabs(pos.lat() - user_latitude) * ft_per_deg_lat; double lon_range = fabs(pos.lon() - user_longitude) * ft_per_deg_lon; - double range_ft = lat_range*lat_range + lon_range*lon_range; + double range_ft = sqrt(lat_range*lat_range + lon_range*lon_range); range = range_ft / 6076.11549; // Calculate speed of rising air if within range.