[chronojump] New method: Util.DivideSafeAndGetInt()
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] New method: Util.DivideSafeAndGetInt()
- Date: Wed, 31 Jul 2019 15:45:44 +0000 (UTC)
commit 3924922ca00e7e99894780f0a93a24232ac9f137
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jul 31 17:40:48 2019 +0200
New method: Util.DivideSafeAndGetInt()
src/util.cs | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/util.cs b/src/util.cs
index 979493dd..a16262b2 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1998,6 +1998,12 @@ public class Util
return val1 / val2;
}
+ public static int DivideSafeAndGetInt (double val1, double val2)
+ {
+ return Convert.ToInt32(DivideSafe(val1, val2));
+ }
+
+
/*
//converts all values to positive
public static string StringValuesAbsolute (string myString) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]