From e263fca88a88e517b33c4e33b257d4800428eb1a Mon Sep 17 00:00:00 2001 From: logon Date: Wed, 4 Sep 2019 21:05:13 +0200 Subject: [PATCH] Changed so that the percent is show with two decimal points. --- CensusPlusClassic.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CensusPlusClassic.lua b/CensusPlusClassic.lua index 5df9a3b..d5bacb7 100644 --- a/CensusPlusClassic.lua +++ b/CensusPlusClassic.lua @@ -3123,7 +3123,7 @@ function CensusPlus_OnEnterRace(self, motion) local raceName = thisFactionRaces[id] local count = g_RaceCount[id] if (count ~= nil) and (g_TotalCount > 0) then - local percent = floor((count / g_TotalCount) * 100) + local percent = string.format("%.2f", (count / g_TotalCount) * 100) GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText( raceName .. "\n" .. count .. "\n" .. percent .. "%", @@ -3151,7 +3151,7 @@ function CensusPlus_OnEnterClass(self, motion) local className = thisFactionClasses[id] local count = g_ClassCount[id] if (count ~= nil) and (g_TotalCount > 0) then - local percent = floor((count / g_TotalCount) * 100) + local percent = string.format("%.2f", (count / g_TotalCount) * 100) GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText( className .. "\n" .. count .. "\n" .. percent .. "%", @@ -3176,7 +3176,7 @@ function CensusPlus_OnEnterLevel(self, motion ) local id = self:GetID() local count = g_LevelCount[id] if (count ~= nil) and (g_TotalCount > 0) then - local percent = floor((count / g_TotalCount) * 100) + local percent = string.format("%.2f", (count / g_TotalCount) * 100) GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText( LEVEL .. " " .. id .. "\n" .. count .. "\n" .. percent .. "%",