mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:40:11 +02:00
changed fmax to std::max
This commit is contained in:
parent
b0f8e21d06
commit
124250b2c2
1 changed files with 26 additions and 25 deletions
|
@ -8,6 +8,7 @@
|
||||||
// Threaded or non-threaded packet sender.
|
// Threaded or non-threaded packet sender.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -219,7 +220,7 @@ bool PacketSender::nonThreadedProcess() {
|
||||||
|
|
||||||
// we will reset our check PPS and time each second (callsPerSecond) or at least 5 calls (if we get called less frequently
|
// we will reset our check PPS and time each second (callsPerSecond) or at least 5 calls (if we get called less frequently
|
||||||
// than 5 times per second) This gives us sufficient smoothing in our packet adjustments
|
// than 5 times per second) This gives us sufficient smoothing in our packet adjustments
|
||||||
float callIntervalsPerReset = fmax(callsPerSecond, MIN_CALL_INTERVALS_PER_RESET);
|
float callIntervalsPerReset = std::max(callsPerSecond, MIN_CALL_INTERVALS_PER_RESET);
|
||||||
|
|
||||||
if (elapsedSinceLastCheck > (averageCallTime * CALL_INTERVALS_TO_CHECK)) {
|
if (elapsedSinceLastCheck > (averageCallTime * CALL_INTERVALS_TO_CHECK)) {
|
||||||
float ppsOverCheckInterval = (float)_packetsOverCheckInterval;
|
float ppsOverCheckInterval = (float)_packetsOverCheckInterval;
|
||||||
|
|
Loading…
Reference in a new issue