Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
typed-geometry
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
typed-geometry
Merge requests
!37
Fixed contains(sphere, pos) test.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fixed contains(sphere, pos) test.
kschuster
into
develop
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Kersten Schuster
requested to merge
kschuster
into
develop
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
richtig schöner bug :D
und coole smileys :)
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
95740035
1 commit,
5 years ago
1 file
+
2
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/typed-geometry/functions/contains.hh
+
2
−
1
Options
@@ -102,7 +102,8 @@ TG_NODISCARD constexpr bool contains(ball<D, ScalarT> const& s, pos<D, ScalarT>
template
<
int
D
,
class
ScalarT
>
TG_NODISCARD
constexpr
bool
contains
(
sphere
<
D
,
ScalarT
>
const
&
s
,
pos
<
D
,
ScalarT
>
const
&
p
,
ScalarT
eps
=
ScalarT
(
0
))
{
return
tg
::
abs
(
distance_sqr
(
s
.
center
,
p
)
-
s
.
radius
*
s
.
radius
)
<=
eps
;
auto
r
=
s
.
radius
+
eps
;
return
distance_sqr
(
s
.
center
,
p
)
<=
r
*
r
;
}
// Note that eps is used to compare 2D areas, not 1D lengths
Loading