]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/Functors/InvertCostFunction.h
Big bug smashed
[FrontAlgorithms.git] / lib / fpa / Base / Functors / InvertCostFunction.h
index fa04ed4841625428bb0d84e4988e59040d5d8c68..06315c7cafd4ad64c4aef0c50035dd2399df1f6d 100644 (file)
@@ -30,7 +30,7 @@ namespace fpa
         virtual C Evaluate( const C& input ) const
           {
             if( input < C( 0 ) )
-              return( C( -1 ) / ( C( 1 ) + C( input ) ) );
+              return( C( -1 ) / ( C( 1 ) - C( input ) ) );
             else
               return( C( 1 ) / ( C( 1 ) + C( input ) ) );
           }