Skip to content
Snippets Groups Projects
Commit ade72b67 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

correct setup of testing data

parent 76a54130
No related branches found
No related tags found
No related merge requests found
......@@ -246,10 +246,10 @@ void test_Interpolation()
ImageHandle ih2d=CreateImage(Extent(Point(0,0),Point(1,1)));
ih3d.SetReal(Point(0,0,0), Real(0.000));
ih3d.SetReal(Point(1,0,0), Real(0.500));
ih3d.SetReal(Point(0,1,0), Real(0.250));
ih3d.SetReal(Point(1,1,0), Real(0.125));
ih2d.SetReal(Point(0,0), Real(0.000));
ih2d.SetReal(Point(1,0), Real(0.500));
ih2d.SetReal(Point(0,1), Real(0.250));
ih2d.SetReal(Point(1,1), Real(0.125));
Real val2= (one-dx)*(one-dy)*ih2d.GetReal(Point(0,0))
+( dx )*(one-dy)*ih2d.GetReal(Point(1,0))
+(one-dx)*( dy )*ih2d.GetReal(Point(0,1))
......@@ -258,13 +258,12 @@ void test_Interpolation()
BOOST_CHECK(check_close(val2,ih2d.GetIntpolReal(Vec2(dx,dy)),1.0e-6));
ImageHandle ih1d=CreateImage(Extent(Point(0),Point(1)));
ih3d.SetReal(Point(0,0,0), Real(0.000));
ih3d.SetReal(Point(1,0,0), Real(0.500));
Real val1= (one-dx)*ih1d.GetReal(Point(0,0))
+( dx )*ih1d.GetReal(Point(1,0));
ih1d.SetReal(Point(0), Real(0.000));
ih1d.SetReal(Point(1), Real(0.500));
Real val1= (one-dx)*ih1d.GetReal(Point(0))
+( dx )*ih1d.GetReal(Point(1));
BOOST_CHECK(check_close(val1,ih1d.GetIntpolReal(dx),1.0e-6));
}
void test_ScalarOps()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment