1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

Everywhere: Use AK/Math.h if applicable

AK's version should see better inlining behaviors, than the LibM one.
We avoid mixed usage for now though.

Also clean up some stale math includes and improper floatingpoint usage.
This commit is contained in:
Hendiadyoin1 2021-07-17 18:29:28 +02:00 committed by Ali Mohammad Pur
parent c5f6ba6e71
commit ed46d52252
40 changed files with 116 additions and 156 deletions

View file

@ -292,7 +292,7 @@ int main(int argc, char** argv)
NtpTimestamp T3 = transmit_timestamp;
NtpTimestamp T4 = destination_timestamp;
auto timestamp_difference_in_seconds = [](NtpTimestamp from, NtpTimestamp to) {
return static_cast<int64_t>(to - from) / pow(2.0, 32);
return static_cast<i64>(to - from) >> 32;
};
// The network round-trip time of the request.