From 14b5eade243f4dd2923049ca7928e30abd738cbf Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 8 Sep 2015 16:03:11 +0200 Subject: [PATCH] Improved code layout. --- lib/stats/ticket_load_measure.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stats/ticket_load_measure.rb b/lib/stats/ticket_load_measure.rb index 212526717..85c6002ac 100644 --- a/lib/stats/ticket_load_measure.rb +++ b/lib/stats/ticket_load_measure.rb @@ -21,7 +21,7 @@ class Stats::TicketLoadMeasure end if total != 0 - load_measure_precent = ( count.to_f / (total.to_f/100) ).round(3) + load_measure_precent = ( count.to_f / (total.to_f / 100) ).round(3) end { used_for_average: load_measure_precent, @@ -42,7 +42,7 @@ class Stats::TicketLoadMeasure return result end - in_percent = ( result[:used_for_average].to_f / (result[:average_per_agent].to_f/100) ).round(1) + in_percent = ( result[:used_for_average].to_f / (result[:average_per_agent].to_f / 100) ).round(1) result[:average_per_agent_in_percent] = in_percent if in_percent >= 90 result[:state] = 'supergood' @@ -57,7 +57,7 @@ class Stats::TicketLoadMeasure end # convert result[:used_for_average] in percent to related total - result[:average_per_agent] = ( (result[:total].to_f/100) * result[:average_per_agent] ).round(1) + result[:average_per_agent] = ( (result[:total].to_f / 100) * result[:average_per_agent] ).round(1) result end