ns-allinone-2.35/olsr/OLSR.cc
double
OLSR::emf_to_seconds(u_int8_t olsr_format) {
	// This implementation has been taken from unik-olsrd-0.4.5 (mantissa.c),
	// licensed under the GNU Public License (GPL)
	int a = olsr_format >> 4;
	int b = olsr_format - a*16;
	return (double)(OLSR_C*(1+(double)a/16)*(double)pow(2,b));
}
///
/// \brief Converts a number of seconds in the mantissa/exponent format to a decimal number.
///
/// \param olsr_format number of seconds in mantissa/exponent format.
/// \return the decimal number of seconds.
///
\brief Converts a number of seconds in the mantissa/exponent format to a decimal number.
\param olsr_format number of seconds in mantissa/exponent format.
\return the decimal number of seconds.
\ brief Converts a number of seconds in the mantissa / exponent format to a decimal number . \ param olsr_format number of seconds in mantissa / exponent format . \ return the decimal number of seconds .
double
OLSR::emf_to_seconds(u_int8_t olsr_format) {
	int a = olsr_format >> 4;
	int b = olsr_format - a*16;
	return (double)(OLSR_C*(1+(double)a/16)*(double)pow(2,b));
}
double OLSR :: emf_to_seconds ( u_int8_t olsr_format ) { int a = olsr_format >> 4 ; int b = olsr_format - a * 16 ; return ( double ) ( OLSR_C * ( 1 + ( double ) a / 16 ) * ( double ) pow ( 2 , b ) ) ; }
\brief Converts a number of seconds in the mantissa/exponent format to a decimal number.
\ brief Converts a number of seconds in the mantissa / exponent format to a decimal number .
// This implementation has been taken from unik-olsrd-0.4.5 (mantissa.c), // licensed under the GNU Public License (GPL)