aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/RelCalcHelper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/RelCalcHelper.cc b/src/FbTk/RelCalcHelper.cc
index a537de4..9a018dc 100644
--- a/src/FbTk/RelCalcHelper.cc
+++ b/src/FbTk/RelCalcHelper.cc
@@ -26,11 +26,11 @@ namespace FbTk {
26 namespace RelCalcHelper { 26 namespace RelCalcHelper {
27 27
28 int calPercentageValueOf(int i, int j) { 28 int calPercentageValueOf(int i, int j) {
29 return floor(i * j / 100 + 0.5); 29 return static_cast<int>(floor((static_cast<float>(i*j) / 100) + 0.5));
30 } 30 }
31 31
32 int calPercentageOf(int i, int j) { 32 int calPercentageOf(int i, int j) {
33 return floor((float) i / (float) j * 100 + 0.5); 33 return static_cast<int>(floor((float) i / (float) j * 100 + 0.5));
34 } 34 }
35 35
36 } 36 }