adjusted epsilon threshold for float changes in row editor

some systems (like new OC.de production server) need less precision
This commit is contained in:
following
2013-02-05 22:34:57 +01:00
parent 8b5acd8de8
commit 4b0a5da369

View File

@@ -353,7 +353,7 @@ class rowEditor
// Direct float comparison is deprecated and can result in last-digit errors.
// Floats in OC database are only used for reasonably large numbers like coordinates,
// waylengths and time estimates, so using a fixed epsilon threshold is safe:
$changed = (abs($sFormatedValue - $this->fields[$sField]['value']) >= 1e-13);
$changed = (abs($sFormatedValue - $this->fields[$sField]['value']) >= 1e-12);
else
$changed = ($sFormatedValue != $this->fields[$sField]['value']);
if ($changed)