Bugzilla – Attachment #793: Proposed patch. for bug #844
{
NS_ASSERT (m_txPowerBaseDbm <= m_txPowerEndDbm);
NS_ASSERT (m_nTxPower > 0);
double dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm - m_txPowerBaseDbm) / m_nTxPower;
double dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm - m_txPowerBaseDbm) / (m_nTxPower == 1 ? 1 : m_nTxPower - 1);
return dbm;
}