From dc66959b832e263a83adf61456b62d646b5fc3cc Mon Sep 17 00:00:00 2001
From: Henning Stahlke <github@henningstahlke.de>
Date: Mon, 27 Feb 2017 09:09:16 +0100
Subject: [PATCH] YASim comments

---
 src/FDM/YASim/Surface.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/FDM/YASim/Surface.cpp b/src/FDM/YASim/Surface.cpp
index 6201fcf00..0d6778335 100644
--- a/src/FDM/YASim/Surface.cpp
+++ b/src/FDM/YASim/Surface.cpp
@@ -203,8 +203,7 @@ void Surface::calcForce(const float* v, const float rho, float* out, float* torq
     // Split v into magnitude and direction:
     float vel = Math::mag3(v);
 
-    // Handle the blowup condition.  Zero velocity means zero force by
-    // definition.
+    // Zero velocity means zero force by definition (also prevents div0).
     if(vel == 0) {
         int i;
 	for(i=0; i<3; i++) out[i] = torque[i] = 0;
@@ -217,10 +216,9 @@ void Surface::calcForce(const float* v, const float rho, float* out, float* torq
         for(int i=0; i<3; i++) out[i] = torque[i] = 0.;
         return;
     }
-
+    
+    // Normalize wind and convert to the surface's coordinates
     Math::mul3(1/vel, v, out);
-
-    // Convert to the surface's coordinates
     Math::vmul33(_orient, out, out);
 
     // "Rotate" by the incidence angle.  Assume small angles, so we