10TEST(Method, operatorSlice) {
14 vec3<vec3f> v33f({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
15 auto s = xcmath::slice_from_to<0, 4, 2>;
16 auto s2 = xcmath::slice_start_len<1, 4>;
17 auto s3 = xcmath::slice_start_len<0, 4, 3>;
19 auto qq = v33f(xcmath::slice_from_to<0, 1>, xcmath::slice_from_to<0, 1>);
20 EXPECT_FLOAT_EQ(qq[0][0], 1);
21 EXPECT_FLOAT_EQ(qq[0][1], 2);
22 EXPECT_FLOAT_EQ(qq[1][0], 4);
23 EXPECT_FLOAT_EQ(qq[1][1], 5);
24 auto qq2 = v33f(xcmath::slice_from_to<1, 2>, xcmath::slice_from_to<1, 2>);
25 EXPECT_FLOAT_EQ(qq2[0][0], 5);
26 EXPECT_FLOAT_EQ(qq2[0][1], 6);
27 EXPECT_FLOAT_EQ(qq2[1][0], 8);
28 EXPECT_FLOAT_EQ(qq2[1][1], 9);