use Math.fround instead of Math.round

This commit is contained in:
Karim Akra 2024-06-09 01:25:21 +03:00 committed by GitHub
parent ade4aeb3f7
commit 7904a6a20f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,7 +36,7 @@ class MemoryCounter extends TextField
@:noCompletion
#if !flash override #end function __enterFrame(deltaTime:Float):Void
{
var mem:Float = Math.round(MemoryUtil.getMemoryUsed() / BYTES_PER_MEG / ROUND_TO) * ROUND_TO;
var mem:Float = Math.fround(MemoryUtil.getMemoryUsed() / BYTES_PER_MEG / ROUND_TO) * ROUND_TO;
if (mem > memPeak) memPeak = mem;