Changeset 810 for cpp/frams/model
 Timestamp:
 07/27/18 16:21:58 (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/model/geometry/geometryutils.cpp
r658 r810 336 336 { 337 337 x += d / sqrt(1.0 + (b*b * x*x) / (a*a * (a*a  x*x))); 338 y = b * sqrt(1.0  (x*x) / (a*a)); 338 double sqrt_arg = 1.0  (x*x) / (a*a); 339 if (sqrt_arg >= 0) 340 y = b * sqrt(sqrt_arg); 341 else 342 y = std::numeric_limits<double>::signaling_NaN(); 343 //This function is called from MeshBuilder::EllipsoidSurface::findNextAreaEdgeAndPhase(). 344 //y=NaN set above cooccurs with the value of x that doesn't meet the condition tested in findNextAreaEdgeAndPhase(). 345 //If the condition is true (i.e., x exceeds the allowed range), entirely new values of x and y are set in the next step anyway. 346 //An impossibletocalculate y should never be used for invalid x, hence y=NaN is set here to indicate this specific situation and signal just in case anyone would try to use such y. 339 347 } 340 348
Note: See TracChangeset
for help on using the changeset viewer.