Permalink
Browse files

more indentation cleanup

  • Loading branch information...
1 parent 56dff0a commit 40604cf120074bd93d6f9b85ccb338025f553312 @si14 si14 committed Oct 30, 2011
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/jn_mavg.erl
View
@@ -96,15 +96,15 @@ bump_mavg(MA, Events, T) when
Elapsed =:= 0 -> MA#mavg{unprocessedEvents = HoldEvs + Events,
eventCounter = UpdatedCounter };
Elapsed < (8 * Period), Elapsed > 0 ->
- % Integrate HoldEvs, since they're for a single period
- HoldAvg = (Average - HoldEvs) * math:exp(-1/Period) + HoldEvs,
- % Integrate zero-filled periods, of which there are (Elapsed-1)
- ZeroAvg = HoldAvg * math:exp((1-Elapsed)/Period),
- MA#mavg{unprocessedEvents = Events, historicAvg = ZeroAvg,
- lastupdatets = T, eventCounter = UpdatedCounter };
- true ->
- MA#mavg{unprocessedEvents = Events, historicAvg = 0.0,
- lastupdatets = T, eventCounter = UpdatedCounter }
+ %% Integrate HoldEvs, since they're for a single period
+ HoldAvg = (Average - HoldEvs) * math:exp(-1/Period) + HoldEvs,
+ %% Integrate zero-filled periods, of which there are (Elapsed-1)
+ ZeroAvg = HoldAvg * math:exp((1-Elapsed)/Period),
+ MA#mavg{unprocessedEvents = Events, historicAvg = ZeroAvg,
+ lastupdatets = T, eventCounter = UpdatedCounter };
+ true ->
+ MA#mavg{unprocessedEvents = Events, historicAvg = 0.0,
+ lastupdatets = T, eventCounter = UpdatedCounter }
end.
updateEventCounter(Events, EventsCounter, NowTS, Period) ->

0 comments on commit 40604cf

Please sign in to comment.