Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tg-samples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philip Trettner
tg-samples
Merge requests
!4
tangent and tbn matrix tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
tangent and tbn matrix tests
kschuster
into
develop
Overview
0
Commits
4
Pipelines
1
Changes
11
Merged
Kersten Schuster
requested to merge
kschuster
into
develop
6 years ago
Overview
0
Commits
4
Pipelines
1
Changes
11
Expand
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
662a1a6b
4 commits,
6 years ago
11 files
+
139
−
20
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
tests/geometry/functions/area.cc
+
2
−
2
Options
@@ -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.0
f
,
360.0
f
));
auto
alpha
=
tg
::
degree
(
uniform
(
rng
,
0.0
f
,
360.0
f
));
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.0
f
;
f32
randomScale
=
0.0
f
;
while
(
randomScale
==
0.0
f
)
while
(
randomScale
==
0.0
f
)
randomScale
=
uniform
(
rng
,
-
10.0
f
,
10.0
f
);
randomScale
=
uniform
(
rng
,
-
10.0
f
,
10.0
f
);
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