[JSBSim] Relax the assert when trying to clip with max < min.
Throwing an exception was too harsh. Instead the clipping is ignored and a warning message issued.
This commit is contained in:
parent
a9365cd34e
commit
90a04a4baa
1 changed files with 4 additions and 4 deletions
|
@ -236,10 +236,10 @@ void FGFCSComponent::Clip(void)
|
||||||
double range = vmax - vmin;
|
double range = vmax - vmin;
|
||||||
|
|
||||||
if (range < 0.0) {
|
if (range < 0.0) {
|
||||||
cerr << "Trying to clip with a max value " << ClipMax->GetName()
|
cerr << "Trying to clip with a max value (" << vmax << ") from "
|
||||||
<< " lower than the min value " << ClipMin->GetName()
|
<< ClipMax->GetName() << " lower than the min value (" << vmin
|
||||||
<< endl;
|
<< ") from " << ClipMin->GetName() << "." << endl
|
||||||
throw("JSBSim aborts");
|
<< "Clipping is ignored." << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue