Skip to content

Fix tests with very long float precison #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/Greenwich.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ $diferenceAiry = haversine($polar['lat'], $polar['long'], $polar['lat'], 0);
//lat long of merdian in Airy 1830 ideally long of 0
var_dump($polar);
//distance in m of difference from lat long and meridian
var_dump($diferenceWGS84 * 1000, $diferenceAiry * 1000);
echo round($diferenceWGS84 * 1000, 8),PHP_EOL;
echo round($diferenceAiry * 1000, 8),PHP_EOL;
--EXPECT--
array(3) {
["lat"]=>
Expand All @@ -26,5 +27,5 @@ array(3) {
["height"]=>
float(-21.205192557536)
}
float(102.84185171429)
float(9.4481679649233)
102.84185171
9.44816796
15 changes: 6 additions & 9 deletions tests/WGS84_to_OSGB36.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ $long = dms_to_decimal(-1, 28, 1);

$polar = transform_datum($lat, $long, GEO_WGS84, GEO_AIRY_1830);

var_dump($polar);
echo round($polar['lat'], 8),PHP_EOL;
echo round($polar['long'], 8),PHP_EOL;
echo round($polar['height'], 8),PHP_EOL;
--EXPECT--
array(3) {
["lat"]=>
float(53.38334018402)
["long"]=>
float(-1.4654162848544)
["height"]=>
float(-24.780265408568)
}
53.38334018
-1.46541628
-24.78026541