From: enk Date: Tue, 21 Mar 2006 08:00:48 +0000 (+0000) Subject: Fix for Bug IPAL11055: X-Git-Tag: T3_2_0b1_pre1~97 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d2b75f321fe64750f2cf87acf6688ccb4b3d78f4;p=modules%2Fsmesh.git Fix for Bug IPAL11055: It is impossible to input negative value as f(t) in table function. --- diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index 1223fc009..5b0416db6 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -122,10 +122,11 @@ double FunctionTable::integral( const int i ) const double FunctionTable::integral( const int i, const double d ) const { - double f, res = 0.0; - if( value( myData[2*i]+d, f ) ) - res = ( myData[2*i+1] + f ) / 2.0 * d; - + double f1,f2, res = 0.0; + if( value( myData[2*i]+d, f1 ) ) + if(!value(myData[2*i], f2)) + f2 = myData[2*i+1]; + res = (f2+f1) * d / 2.0; return res; }