diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 40d05f8094d..06758a7d7a3 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -53,7 +53,7 @@ namespace CommonKernelFunctors { return 0; } else if(certainly_not(is_zero(vec.y()))){ return 1; - }else if(certainly_not(is_zero(vec.y()))){ + }else if(certainly_not(is_zero(vec.z()))){ return 2; } diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_vector_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_vector_3.h index b679a30e83d..4d6ab531bb4 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_vector_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_vector_3.h @@ -27,6 +27,8 @@ _test_fct_vector_3(const R& ) typedef typename R::RT RT; typedef typename R::FT FT; + typedef typename R::Non_zero_dimension_3 Non_zero_dimension_3; + RT n0( 0 ); RT n1( 12 ); RT n2( -4 ); @@ -43,6 +45,8 @@ _test_fct_vector_3(const R& ) CGAL::Vector_3 v0(CGAL::NULL_VECTOR); // ( 0, 0, 0) + CGAL::Vector_3 v001(n0,n0,n1); // ( 0, 0, 12) + CGAL::Vector_3 v011(n0,n1,n1); // ( 0, 12, 12) CGAL::Vector_3 v1(n1, n2, n3, n4); // ( 6,-2, 3) CGAL::Vector_3 v2(n5, n6, n7, n8); // ( 3,-6,12) CGAL::Vector_3 v3(n5, n10, n9); // ( 9,-8,15) @@ -53,6 +57,12 @@ _test_fct_vector_3(const R& ) CGAL::Vector_3 v11(-n6, n11,-n12, n8);// ( 6, 8, -18) CGAL::Vector_3 v12(n1, n2, -n3, n4); // ( 6,-2, -3) + Non_zero_dimension_3 nzd; + assert( nzd(v0) == -1 ); + assert( nzd(v001) == 2 ); + assert( nzd(v011) == 1 ); + assert( nzd(v1) == 0 ); + assert( orientation(v0, v0, v0) == CGAL::COPLANAR ); assert( orientation(v1, v1, v1) == CGAL::COPLANAR ); assert( orientation(v1, v1, v2) == CGAL::COPLANAR );