mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 20:13:40 +02:00
cast numerator to float before divide
This commit is contained in:
parent
ce214bc439
commit
a90cd7ed31
1 changed files with 2 additions and 2 deletions
|
@ -864,8 +864,8 @@ SharedNodePointer NodeList::soloNodeOfType(char nodeType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeList::getPacketStats(float& packetsPerSecond, float& bytesPerSecond) {
|
void NodeList::getPacketStats(float& packetsPerSecond, float& bytesPerSecond) {
|
||||||
packetsPerSecond = (float) _numCollectedPackets / (float) (_packetStatTimer.elapsed() / 1000.0f);
|
packetsPerSecond = (float) _numCollectedPackets / ((float) _packetStatTimer.elapsed() / 1000.0f);
|
||||||
bytesPerSecond = (float) _numCollectedBytes / (float) (_packetStatTimer.elapsed() / 1000.0f);
|
bytesPerSecond = (float) _numCollectedBytes / ((float) _packetStatTimer.elapsed() / 1000.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeList::resetPacketStats() {
|
void NodeList::resetPacketStats() {
|
||||||
|
|
Loading…
Reference in a new issue