[chronojump] DivideSafeFraction on GetLoss
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DivideSafeFraction on GetLoss
- Date: Thu, 25 May 2017 15:17:32 +0000 (UTC)
commit fbc98b8b14584021c84f6ed330f0bf19f2bc1d32
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu May 25 17:10:15 2017 +0200
DivideSafeFraction on GetLoss
src/json.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/json.cs b/src/json.cs
index 8f7e488..383fe2f 100644
--- a/src/json.cs
+++ b/src/json.cs
@@ -562,6 +562,6 @@ public class UploadEncoderDataObject
if(compareTo > highest)
highest = compareTo;
}
- return Convert.ToInt32(100.0 * (highest - lowest) / highest);
+ return Convert.ToInt32(Util.DivideSafeFraction(100.0 * (highest - lowest), highest));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]