Skip to content

Commit 9bc71be

Browse files
committed
fix float value
1 parent 991a707 commit 9bc71be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Integration/SpatialTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function testDistanceValue()
212212
$a = GeometryModel::distanceValue('location', $loc1->location)->get();
213213
$this->assertCount(2, $a);
214214
$this->assertEquals(0, $a[0]->distance);
215-
$this->assertEquals(1.4142135623, $a[1]->distance); // PHP floats' 11th+ digits don't matter
215+
$this->assertEquals(1.4142135623730951, $a[1]->distance);
216216
}
217217

218218
public function testDistanceSphereValue()
@@ -230,9 +230,9 @@ public function testDistanceSphereValue()
230230
$this->assertEquals(0, $a[0]->distance);
231231

232232
if ($this->after_fix) {
233-
$this->assertEquals(44.7414064842, $a[1]->distance); // PHP floats' 11th+ digits don't matter
233+
$this->assertEquals(44.741406484236215, $a[1]->distance);
234234
} else {
235-
$this->assertEquals(44.7414064845, $a[1]->distance); // PHP floats' 11th+ digits don't matter
235+
$this->assertEquals(44.741406484236215, $a[1]->distance);
236236
}
237237
}
238238

0 commit comments

Comments
 (0)