3 #include "testing/testing.h"
11 TEST(math_vec_types, ScalarConstructorUnsigned)
18 TEST(math_vec_types, ScalarConstructorInt)
25 TEST(math_vec_types, ScalarConstructorFloat)
28 EXPECT_FLOAT_EQ(f[0], 5.2f);
29 EXPECT_FLOAT_EQ(f[1], 5.2f);
32 TEST(math_vec_types, ScalarConstructorDouble)
35 EXPECT_FLOAT_EQ(d[0], 5.2f);
36 EXPECT_FLOAT_EQ(d[1], 5.2f);
39 TEST(math_vec_types, MultiScalarConstructorVec2)
46 TEST(math_vec_types, MultiScalarConstructorVec3)
54 TEST(math_vec_types, MultiScalarConstructorVec4)
63 TEST(math_vec_types, MixedScalarVectorConstructorVec3)
66 EXPECT_FLOAT_EQ(fl_v2[0], 5.5f);
67 EXPECT_FLOAT_EQ(fl_v2[1], 5.5f);
68 EXPECT_FLOAT_EQ(fl_v2[2], 1.8f);
71 EXPECT_FLOAT_EQ(v2_fl[0], 1.8f);
72 EXPECT_FLOAT_EQ(v2_fl[1], 5.5f);
73 EXPECT_FLOAT_EQ(v2_fl[2], 5.5f);
76 TEST(math_vec_types, MixedScalarVectorConstructorVec4)
115 TEST(math_vec_types, ComponentMasking)
123 TEST(math_vec_types, PointerConversion)
125 float array[3] = {1.0f, 2.0f, 3.0f};
132 TEST(math_vec_types, PointerArrayConversion)
134 float array[1][3] = {{1.0f, 2.0f, 3.0f}};
142 TEST(math_vec_types, VectorTypeConversion)
154 EXPECT_FLOAT_EQ(
result.x, 2.0f);
155 EXPECT_FLOAT_EQ(
result.y, 1.0f);
158 TEST(math_vec_types, DivideFloatByVector)
163 EXPECT_FLOAT_EQ(
result.x, 4.0f);
164 EXPECT_FLOAT_EQ(
result.y, 1.0f);
167 TEST(math_vec_types, DivideFloatByVectorSmall)
170 EXPECT_FLOAT_EQ(
result.x, 1.0f);
171 EXPECT_FLOAT_EQ(
result.y, 1.0f);
typedef float(TangentPoint)[2]
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
void Divide(const JntArray &src, const double &factor, JntArray &dest)
TEST(any, DefaultConstructor)
vec_base< double, 2 > double2
vec_base< uint32_t, 3 > uint3
vec_base< float, 3 > float3
vec_base< uint32_t, 2 > uint2
vec_base< float, 2 > float2
vec_base< int32_t, 2 > int2
static const pxr::TfToken b("b", pxr::TfToken::Immortal)