Skip to content
Snippets Groups Projects

tangent and tbn matrix tests

Merged Kersten Schuster requested to merge kschuster into develop
11 files
+ 139
20
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -10,11 +10,11 @@ TG_FUZZ_TEST(TypedGeometry, Area)
@@ -10,11 +10,11 @@ TG_FUZZ_TEST(TypedGeometry, Area)
// random 2d transformation
// random 2d transformation
auto alpha = tg::degree(uniform(rng, 0.0f, 360.0f));
auto alpha = tg::degree(uniform(rng, 0.0f, 360.0f));
mat2x2 rotation = {vec2(cos(alpha), -sin(alpha)), vec2(sin(alpha), cos(alpha))};
mat2x2 rotation = {{vec2(cos(alpha), -sin(alpha)), vec2(sin(alpha), cos(alpha))}};
f32 randomScale = 0.0f;
f32 randomScale = 0.0f;
while (randomScale == 0.0f)
while (randomScale == 0.0f)
randomScale = uniform(rng, -10.0f, 10.0f);
randomScale = uniform(rng, -10.0f, 10.0f);
mat2x2 scale = {vec2(randomScale, 0), vec2(0, randomScale)};
mat2x2 scale = {{vec2(randomScale, 0), vec2(0, randomScale)}};
auto box = tg::box2(tg::pos2(-10, -10), tg::pos2(10, 10));
auto box = tg::box2(tg::pos2(-10, -10), tg::pos2(10, 10));
auto translation = tg::translation(uniform(rng, box) - pos2::zero);
auto translation = tg::translation(uniform(rng, box) - pos2::zero);
Loading