Skip to content

Commit 512edfc

Browse files
authored
Merge pull request #632 from KristofferC/kc/ambig
slightly restrict signature of `normalize` to avoid an ambiguity with a new Base method
2 parents b9ef1d6 + 0c096fa commit 512edfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spatial/threevectors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ LinearAlgebra.dot(v1::FreeVector3D, v2::FreeVector3D) = begin @framecheck(v1.fra
7676
Base.:*(t::Transform3D, vector::FreeVector3D) = begin @framecheck(t.from, vector.frame); FreeVector3D(t.to, rotation(t) * vector.v) end
7777
Base.:\(t::Transform3D, point::FreeVector3D) = begin @framecheck point.frame t.to; FreeVector3D(t.from, rotation(t) \ point.v) end
7878
LinearAlgebra.norm(v::FreeVector3D) = norm(v.v)
79-
LinearAlgebra.normalize(v::FreeVector3D, p = 2) = FreeVector3D(v.frame, normalize(v.v, p))
79+
LinearAlgebra.normalize(v::FreeVector3D, p::Real = 2) = FreeVector3D(v.frame, normalize(v.v, p))
8080

8181
# Mixed Point3D and FreeVector3D
8282
Base.:+(p1::FreeVector3D, p2::FreeVector3D) = begin @framecheck(p1.frame, p2.frame); FreeVector3D(p1.frame, p1.v + p2.v) end

0 commit comments

Comments
 (0)