[chronojump] RaceAnalyzer. Less information in prints



commit e52a210ce9ed2e17d591ecefb432bdd6f3923658
Author: Xavier Padullés <x padulles gmail com>
Date:   Thu Mar 21 11:37:23 2019 +0100

    RaceAnalyzer. Less information in prints

 r-scripts/scripts-util.R | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/r-scripts/scripts-util.R b/r-scripts/scripts-util.R
index c94aff55..c5fe6b52 100644
--- a/r-scripts/scripts-util.R
+++ b/r-scripts/scripts-util.R
@@ -29,14 +29,14 @@ interpolateXAtY <- function(X, Y, desiredY){
 getAreaUnderCurve <- function(x, y)
 {
         print("Calculating Area")
-        print("X:")
-        print(x)
-        print("Y:")
-        print(y)
+        # print("X:")
+        # print(x)
+        # print("Y:")
+        # print(y)
         x = c(x, x[length(x)], x[1])
         y = c(y, 0, 0)
         totalArea = 0
-        print(paste("V",1," = ", "(",x[1 + 1] - x[1],",", y[1 + 1] - y[1], ")", sep = ""))
+        # print(paste("V",1," = ", "(",x[1 + 1] - x[1],",", y[1 + 1] - y[1], ")", sep = ""))
         for(i in 2:(length(x) -1))
         {
                 parallelogramArea = ((x[i + 1] - x[1])* (y[i] - y[1]) - (x[i] - x[1]) * (y[i+1] - y[1]))
@@ -46,7 +46,7 @@ getAreaUnderCurve <- function(x, y)
                 
                 totalArea = totalArea + parallelogramArea
         }
-        print(paste("toalArea:", totalArea/2))
+        # print(paste("toalArea:", totalArea/2))
         return(totalArea/2) #The area of the parallelograms are twice the triangles areas
 }
 


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