From e475c02f337a98d37263b9f7ddc283de5996f425 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Mon, 27 Mar 2006 16:39:55 +0000 Subject: [PATCH] Fixed tolerance problem, see bug 3225 --- mod/quiz/questiontypes/numerical/questiontype.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/quiz/questiontypes/numerical/questiontype.php b/mod/quiz/questiontypes/numerical/questiontype.php index 0c5aa14fb07..e947c8aeed9 100644 --- a/mod/quiz/questiontypes/numerical/questiontype.php +++ b/mod/quiz/questiontypes/numerical/questiontype.php @@ -379,10 +379,10 @@ class quiz_numerical_qtype extends quiz_shortanswer_qtype { $answer->tolerancetype = 2; // nominal } - // We need to add a tiny fraction (0.00000000000000001) to make the + // We need to add a tiny fraction (0.0000000000001) to make the // comparison work correctly. Otherwise seemingly equal values can yield // false. (fixes bug #3225) - $tolerance = (float)$answer->tolerance + 0.00000000000000001; + $tolerance = (float)$answer->tolerance + 0.0000000000001; switch ($answer->tolerancetype) { case '1': case 'relative': /// Recalculate the tolerance and fall through