Пример #1
0
 explicit    close_at_tolerance( ToleranceType tolerance, fpc::strength fpc_strength = FPC_STRONG ) 
 : m_fraction_tolerance( fpc_detail::fraction_tolerance<FPT>( tolerance ) )
 , m_strength( fpc_strength )
 , m_tested_rel_diff( 0 )
 {
     BOOST_ASSERT_MSG( m_fraction_tolerance >= FPT(0), "tolerance must not be negative!" ); // no reason for tolerance to be negative
 }
Пример #2
0
inline tolerance_manip<FPT>
operator%( FPT v, tolerance_manip_delay const& )
{
    BOOST_STATIC_ASSERT_MSG( (fpc::tolerance_based<FPT>::value), 
                             "tolerance should be specified using a floating points type" );

    return tolerance_manip<FPT>( FPT(v / 100) );
}
Пример #3
0
 // Constructor
 explicit    small_with_tolerance( FPT tolerance ) // <= absolute tolerance
 : m_tolerance( tolerance )
 {
     BOOST_ASSERT( m_tolerance >= FPT(0) ); // no reason for the tolerance to be negative
 }