From 3c9e06b5d345778f0f60b77e3ab9b991adc4ddd7 Mon Sep 17 00:00:00 2001 From: Andrii Penechko Date: Sun, 26 May 2024 20:24:53 +0300 Subject: [PATCH] Fix warning --- source/vox/utils/numfmt.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vox/utils/numfmt.d b/source/vox/utils/numfmt.d index 550e6e6d..7747ed40 100644 --- a/source/vox/utils/numfmt.d +++ b/source/vox/utils/numfmt.d @@ -115,7 +115,7 @@ int calcScale2(Num)(Num val) { import std.math: abs, round, log2; - auto lg = log2(abs(val)); + auto lg = log2(cast(double)abs(val)); double absLog = abs(lg); int scale = cast(int)(round(absLog/10.0))*10;