[chronojump] GetHeightInCm clearer



commit 283d575880656d72ff4632397d2cc84e89beb1ef
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 29 11:19:06 2011 +0200

    GetHeightInCm clearer

 src/util.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/util.cs b/src/util.cs
index f2a469a..92a757b 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -306,7 +306,7 @@ public class Util
 	public static string GetHeightInCentimeters (string time) {
 		// s = 4.9 * (tv/2)^2
 		double timeAsDouble = Convert.ToDouble(time);
-		double height = 100 * 4.9 * ( timeAsDouble / 2.0 ) * ( timeAsDouble / 2.0 ) ;
+		double height = 100 * 4.9 * Math.Pow( timeAsDouble / 2.0 , 2 );
 
 		return height.ToString();
 	}



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