summaryrefslogtreecommitdiffstats
path: root/php-zetacomponents-graph-pr16.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-zetacomponents-graph-pr16.patch')
-rw-r--r--php-zetacomponents-graph-pr16.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/php-zetacomponents-graph-pr16.patch b/php-zetacomponents-graph-pr16.patch
new file mode 100644
index 0000000..132fff9
--- /dev/null
+++ b/php-zetacomponents-graph-pr16.patch
@@ -0,0 +1,22 @@
+From eb8c71d063e3b45855b8454e1e75c45ab1e0c188 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Wed, 3 Jun 2015 15:13:30 +0200
+Subject: [PATCH] avoid float precision issue
+
+---
+ tests/dataset_average_test.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/dataset_average_test.php b/tests/dataset_average_test.php
+index ee5fc4e..23f209b 100644
+--- a/tests/dataset_average_test.php
++++ b/tests/dataset_average_test.php
+@@ -334,7 +334,7 @@ public function testIterateOverAverageDataset2()
+
+ foreach ( $averageDataSet as $key => $value )
+ {
+- $this->assertEquals( (string) ( $start += $stepSize ), $key, 'Wrong step.', .01 );
++ $this->assertEquals( (string) ( round($start += $stepSize,12) ), $key, 'Wrong step.');
+ }
+ }
+