Skip to content
Snippets Groups Projects
Verified Commit 22baa10c authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Remove angle (moved to KM3io)

parent 8f418b86
No related branches found
No related tags found
1 merge request!5Move angle to KM3io
Pipeline #48273 failed
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`.
"""
......
......@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment