[chronojump] Decimals better on inertia moment
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Decimals better on inertia moment
- Date: Fri, 1 Aug 2014 16:28:58 +0000 (UTC)
commit 53bf9d3ed33736ae46e535a64417ef2e527594df
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Aug 1 18:28:18 2014 +0200
Decimals better on inertia moment
src/gui/encoderConfiguration.cs | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index 3cca58a..6060270 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -284,7 +284,7 @@ public class EncoderConfigurationWindow {
if(imResult == 0)
label_im_feedback.Text = message;
else {
- label_im_result_disc.Text = imResult.ToString();
+ label_im_result_disc.Text = Util.TrimDecimals(imResult, 2);
spin_inertia.Value = imResult;
label_im_feedback.Text = "";
@@ -313,9 +313,9 @@ public class EncoderConfigurationWindow {
//IM of all the weights = n * (weight * length^2) Kg*cm^2
double im_weights = n * ( weightInKg * Math.Pow(length,2) );
- label_im_result_weights.Text = im_weights.ToString();
+ label_im_result_weights.Text = Util.TrimDecimals(im_weights, 2);
double im_total = Convert.ToDouble(label_im_result_disc.Text) + im_weights;
- label_im_result_total.Text = im_total.ToString();
+ label_im_result_total.Text = Util.TrimDecimals(im_total, 2);
spin_inertia.Value = im_total;
table_im_weights_and_total_result.Visible = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]