{
double anX = theFirstX * (1-t) + theLastX * t;
double anY = theFirstY * (1-t) + theLastY * t;
- double aZ = aStepZ * aStepZ + sin( (float)rand() );
+ double aZ = aStepZ * aStepZ + sin( 10*t );
theStream << anX << " " << anY << " " << aZ << " \n";
aStepZ += 0.2;
{
QTextStream anOutStream( &aTmpFile );
- test_srand( 4587 );
generateOne( anOutStream, 0, 5, 0, -5 );
generateOne( anOutStream, 10, 5, 10, -5 );
generateOne( anOutStream, 20, 5, 20, -5 );
generateOne( anOutStream, 1040.079834, -441.303467, 1017.623413, -459.9102175 );
generateOne( anOutStream, 1055.478516, -456.060547, 1034.946899, -475.9505 );
generateOne( anOutStream, 1074.085327, -474.025665, 1058.044922, -493.274017 );
- test_srand( 0 );
}
aTmpFile.close();
gp_XY aTestPoint( 1, 1 );
double anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.9186, anAltitude, EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.2432, anAltitude, EPS );
aTestPoint = gp_XY( 0.5, 0.5 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.3452, anAltitude, EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -0.3816, anAltitude, EPS );
aTestPoint = gp_XY( 1.5, 1 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.9157, anAltitude, EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.2432, anAltitude, EPS );
aTestPoint = gp_XY( 1.5, 0.7 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.8782, anAltitude, EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -0.1608, anAltitude, EPS );
aTestPoint = gp_XY( 1.5, -0.7 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.9678, anAltitude, EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0093, anAltitude, EPS );
aTestPoint = gp_XY( 2, 3.5 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT_DOUBLES_EQUAL( 12.4364, anAltitude, EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 12.6829, anAltitude, EPS );
aDoc->Close();
}