Skip to content

Commit

Permalink
deegree#857 fixed unit test failure due to precision issue with jdk 11
Browse files Browse the repository at this point in the history
  • Loading branch information
tfr42 committed Nov 25, 2020
1 parent 1303054 commit ee8a1c8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ public void visualizeCircle() {
double[] p1 = new double[] { -3, 0.5 };
double[] p2 = new double[] { -2.3, -2.5 };
Points positions = createLinearArc( p0, p1, p2, true );
Assert.assertEquals( exportToWKT( positions ).trim(),
"LINESTRING (-1.7 2.5, -2.7016581805723767 1.3123248162113277, -3.088808067948505 -0.1923367462669825, -2.7847698788517685 -1.715968011523047, -1.8497621054164624 -2.95679512136171, -0.4689745042892608 -3.6690570489335883, 1.0841110058779768 -3.711681584163785, 2.50188679245283 -3.0762264150943404, 3.5035449730252055 -1.8885512313056685, 3.8906948604013345 -0.3838896688273583, 3.5866566713045978 1.1397415964287063, 2.651648897869292 2.3805687062673697, 1.2708612967420905 3.092830633839248, -0.2822242134251467 3.1354551690694445, -1.7 2.5)" );
Assert.assertEquals( "LINESTRING (-1.7 2.5, -2.7016581805723767 1.3123248162113277, -3.088808067948505 -0.1923367462669825, -2.7847698788517685 -1.715968011523047, -1.8497621054164624 -2.9567951213617105, -0.4689745042892608 -3.6690570489335883, 1.0841110058779768 -3.711681584163785, 2.50188679245283 -3.0762264150943404, 3.5035449730252055 -1.8885512313056685, 3.8906948604013345 -0.3838896688273583, 3.5866566713045978 1.1397415964287063, 2.651648897869292 2.3805687062673697, 1.2708612967420905 3.092830633839248, -0.2822242134251467 3.1354551690694445, -1.7 2.5)",
exportToWKT( positions ).trim() );

// inverse
positions = createLinearArc( p2, p1, p0, true );
LOG.debug( exportToWKT( positions ).trim() );
Assert.assertEquals( exportToWKT( positions ).trim(),
"LINESTRING (-2.3 -2.5, -2.992224229754389 -1.109058926972116, -3.0123899967132983 0.4444805140263982, -2.3565032234136143 1.8529207837948918, -1.1544703292307315 2.8373030135193718, 0.3556313291764255 3.2026582299471267, 1.8747075981788668 2.8766233516769613, 3.1018867924528286 1.9237735849056588, 3.794111022207218 0.5328325118777754, 3.814276789166127 -1.0207069291207391, 3.1583900158664444 -2.4291471988892326, 1.9563571216835611 -3.413529428613713, 0.4462554632764042 -3.778884645041468, -1.0728208057260369 -3.452849766771303, -2.3 -2.5)" );
Assert.assertEquals( "LINESTRING (-2.3 -2.5, -2.992224229754389 -1.109058926972116, -3.0123899967132983 0.4444805140263982, -2.3565032234136143 1.8529207837948918, -1.1544703292307315 2.8373030135193718, 0.3556313291764255 3.2026582299471267, 1.8747075981788668 2.8766233516769613, 3.1018867924528286 1.9237735849056588, 3.794111022207218 0.5328325118777754, 3.814276789166127 -1.0207069291207391, 3.1583900158664444 -2.4291471988892326, 1.9563571216835611 -3.413529428613713, 0.4462554632764042 -3.778884645041468, -1.0728208057260369 -3.452849766771303, -2.3 -2.5)",
exportToWKT( positions ).trim() );
}

/**
Expand Down

0 comments on commit ee8a1c8

Please sign in to comment.