Skip to content

Commit

Permalink
nPower: Config variable name consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Renström committed Oct 17, 2012
1 parent 508b8f0 commit 3a081d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Interface/AddOns/nPower/utils.lua
@@ -1,23 +1,23 @@

local _, addon = ...
local _, nPower = ...

local format = string.format
local floor = math.floor

function addon:FormatValue(self)
function nPower:FormatValue(self)
if (self >= 10000) then
return ('%.1fk'):format(self / 1e3)
else
return self
end
end

function addon:Round(num, idp)
function nPower:Round(num, idp)
local mult = 10^(idp or 0)
return floor(num * mult + 0.5) / mult
end

function addon:Fade(frame, timeToFade, startAlpha, endAlpha)
function nPower:Fade(frame, timeToFade, startAlpha, endAlpha)
if (self:Round(frame:GetAlpha(), 1) ~= endAlpha) then
local mode = startAlpha > endAlpha and 'In' or 'Out'
securecall('UIFrameFade'..mode, frame, timeToFade, startAlpha, endAlpha)
Expand Down

0 comments on commit 3a081d7

Please sign in to comment.