Skip to content

Commit da2a5e5

Browse files
committed
normalize! was only defined in JuliaLang/julia#13681 (Julia 0.5.0-dev+8353)
1 parent 891cf5c commit da2a5e5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vec.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,14 @@ function Base.norm{T<:Real}(x::Union{Vec{T},Vec{Complex{T}}}, p::Number)
271271
v[1]
272272
end
273273

274+
if version >= v"0.5.0-dev+8353" # JuliaLang/julia#13681
275+
import Base.normalize!
276+
else
277+
export normalize!
278+
end
279+
274280
# computes v = norm(x,2), divides x by v, and returns v
275-
function Base.normalize!{T<:Scalar}(x::Vec{T})
281+
function normalize!{T<:Scalar}(x::Vec{T})
276282
v = Array(T, 1)
277283
chk(C.VecNormalize(x.p, v))
278284
v[1]

0 commit comments

Comments
 (0)