Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NeRCA.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Tamas Gal
NeRCA.jl
Commits
22baa10c
Verified
Commit
22baa10c
authored
1 year ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Remove angle (moved to KM3io)
parent
8f418b86
No related branches found
No related tags found
1 merge request
!5
Move angle to KM3io
Pipeline
#48273
failed
1 year ago
Stage: test
Stage: docs
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/math.jl
+0
-6
0 additions, 6 deletions
src/math.jl
test/math_tests.jl
+0
-8
0 additions, 8 deletions
test/math_tests.jl
with
0 additions
and
14 deletions
src/math.jl
+
0
−
6
View file @
22baa10c
Base
.
angle
(
d1
,
d2
)
=
acos
(
min
(
dot
(
normalize
(
d1
),
normalize
(
d2
)),
1
))
# TODO: type piracy: this needs to go to KM3io
Base
.
angle
(
a
::
T
,
b
::
T
)
where
{
T
<:
Union
{
KM3io
.
AbstractCalibratedHit
,
KM3io
.
PMT
}}
=
Base
.
angle
(
a
.
dir
,
b
.
dir
)
Base
.
angle
(
a
,
b
::
Union
{
KM3io
.
AbstractCalibratedHit
,
KM3io
.
PMT
})
=
Base
.
angle
(
a
,
b
.
dir
)
Base
.
angle
(
a
::
Union
{
KM3io
.
AbstractCalibratedHit
,
KM3io
.
PMT
},
b
)
=
Base
.
angle
(
a
.
dir
,
b
)
"""
Calculate the cartesian coordinates for given `ϕ`, `θ` and radius `r`.
"""
...
...
This diff is collapsed.
Click to expand it.
test/math_tests.jl
+
0
−
8
View file @
22baa10c
...
...
@@ -2,14 +2,6 @@ using NeRCA
using
Test
@testset
"angle()"
begin
@test
0
==
angle
([
1
,
0
,
0
],
[
1
,
0
,
0
])
@test
π
/
2
≈
angle
([
1
,
0
,
0
],
[
0
,
1
,
0
])
@test
π
/
2
≈
angle
([
1
,
0
,
0
],
[
0
,
0
,
1
])
@test
π
≈
angle
([
1
,
0
,
0
],
[
-
1
,
0
,
0
])
end
@testset
"spread()"
begin
directions
=
[
Direction
(
1.0
,
0.0
,
0.0
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment