From c9272f72506d71c62c873ae108c1508bd4d298bb Mon Sep 17 00:00:00 2001 From: tuckersiegel <siegel.tucker@gmail.com> Date: Sun, 25 Apr 2021 13:25:03 -0400 Subject: [PATCH] remove integer rounding --- controllers/gddAccumulatedController.js | 2 -- controllers/gddConfidenceInterval.js | 2 -- controllers/gddController.js | 1 - controllers/gddNormalController.js | 1 - 4 files changed, 6 deletions(-) diff --git a/controllers/gddAccumulatedController.js b/controllers/gddAccumulatedController.js index 22d52bf..09e0c7b 100644 --- a/controllers/gddAccumulatedController.js +++ b/controllers/gddAccumulatedController.js @@ -26,7 +26,6 @@ function find(collection, query, projection, t_base, res, product) { for (var i = 0; i < min_temps.length; i++) { gdd_value = utils.calculate_gdd(min_temps[i], max_temps[i], t_base, product); - gdd_value = Math.round(gdd_value); gdd_sum += gdd_value gdds.push(gdd_sum) } @@ -55,7 +54,6 @@ function find_normal(collection, query, projection, t_base, res, product) { for (var i = 0; i < gdd_base.length; i++) { gdd_value = (gdd_base[i] - t_base);//utils.calculate_gdd(min_temps[i], max_temps[i], t_base, product); gdd_value = gdd_value < 0 ? 0 : gdd_value; - gdd_value = Math.round(gdd_value); gdd_sum += gdd_value gdds.push(gdd_sum) diff --git a/controllers/gddConfidenceInterval.js b/controllers/gddConfidenceInterval.js index 5db23bd..36cbd61 100644 --- a/controllers/gddConfidenceInterval.js +++ b/controllers/gddConfidenceInterval.js @@ -55,8 +55,6 @@ function find(collection, query, projection, t_base, res, product, confidence_in min_gdd_value = min_gdd_value < 0 ? 0 : min_gdd_value; max_gdd_value = max_gdd_value < 0 ? 0 : max_gdd_value; - min_gdd_value = Math.round(min_gdd_value); - max_gdd_value = Math.round(max_gdd_value); min_gdd_sum += min_gdd_value max_gdd_sum += max_gdd_value diff --git a/controllers/gddController.js b/controllers/gddController.js index 4b8043b..66a4059 100644 --- a/controllers/gddController.js +++ b/controllers/gddController.js @@ -25,7 +25,6 @@ function find(collection, query, projection, t_base, res, product) { for (var i = 0; i < min_temps.length; i++) { gdd_value = utils.calculate_gdd(min_temps[i], max_temps[i], t_base, product); - gdd_value = Math.round(gdd_value); gdds.push(gdd_value) } diff --git a/controllers/gddNormalController.js b/controllers/gddNormalController.js index 44dfa75..5182209 100644 --- a/controllers/gddNormalController.js +++ b/controllers/gddNormalController.js @@ -20,7 +20,6 @@ function find(collection, query, projection, t_base, res, product) { for (var i = 0; i < gdd_base.length; i++) { gdd_value = (gdd_base[i] - t_base);//utils.calculate_gdd(min_temps[i], max_temps[i], t_base, product); gdd_value = gdd_value < 0 ? 0 : gdd_value; - gdd_value = Math.round(gdd_value); gdds.push(gdd_value) } -- GitLab