76 const double tau_difference = tau_decay - tau_rise;
77 double peak_value = 0;
78 if ( std::abs( tau_difference ) > std::numeric_limits< double >::epsilon() )
81 const double t_peak = tau_decay * tau_rise * std::log( tau_decay / tau_rise ) / tau_difference;
83 peak_value = std::exp( -t_peak / tau_decay ) - std::exp( -t_peak / tau_rise );
85 if ( std::abs( peak_value ) < std::numeric_limits< double >::epsilon() )
93 return ( 1. / tau_rise - 1. / tau_decay ) / peak_value;