[banshee] [TrackInfo] Fixed rounding when updating the track score



commit da73b70f8eb21f1036705705cd93c2250ff5260c
Author: Michael Martin-Smucker <mlmartin13 gmail com>
Date:   Fri Sep 11 10:50:23 2009 +1000

    [TrackInfo] Fixed rounding when updating the track score
    
    Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>

 .../Banshee.Core/Banshee.Collection/TrackInfo.cs   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs b/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
index f225a59..efcc4b4 100644
--- a/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
+++ b/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
@@ -116,9 +116,9 @@ namespace Banshee.Collection
         {
             double total_plays = PlayCount + SkipCount;
             if (total_plays <= 0) {
-                Score = (int) Math.Floor ((Score + (percentCompleted * 100)) / 2);
+                Score = (int) Math.Round ((Score + (percentCompleted * 100)) / 2);
             } else {
-                Score = (int) Math.Floor ((((double)Score * total_plays) + (percentCompleted * 100)) / (total_plays + 1));
+                Score = (int) Math.Round ((((double)Score * total_plays) + (percentCompleted * 100)) / (total_plays + 1));
             }
 
             if (percentCompleted <= 0.5) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]