From: <sv...@ww...> - 2004-06-29 11:17:41
|
Author: delta Date: 2004-06-29 04:17:34 -0700 (Tue, 29 Jun 2004) New Revision: 1114 Modified: trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Used clampTo. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1114 Modified: trunk/CSP/CSPSim/Source/LandingGear.cpp =================================================================== --- trunk/CSP/CSPSim/Source/LandingGear.cpp 2004-06-29 11:16:29 UTC (rev 1113) +++ trunk/CSP/CSPSim/Source/LandingGear.cpp 2004-06-29 11:17:34 UTC (rev 1114) @@ -269,7 +269,7 @@ double vCompression = - dot(vBody, normalGroundBody) * motionNormal; // restrict to reasonable limits (faster than this means the gear will // probably break in a moment anyway) - vCompression = std::min(std::max(vCompression, -10.0), 10.0); + vCompression = simdata::clampTo(vCompression, -10.0, 10.0); // ground support (in response to strut compression + damping) double normalForce = (m_K * m_Compression + m_Beta * vCompression) * motionNormal; if (normalForce < 0.0) normalForce = 0.0; // wheel hop |