Skip to content

Commit

Permalink
Update functionlenses.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin authored Jul 31, 2024
1 parent aa57078 commit b84e6b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functionlenses.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ set(f, ::typeof(inverse), invf) = setinverse(f, invf)

set(obj, ::typeof(Base.splat(atan)), val) = @set Tuple(obj) = hypot(obj...) .* sincos(val)
function set(obj, ::typeof(Base.splat(hypot)), val)
omul = iszero(val) ? one(hypot(obj...)) : hypot(obj...)
omul = iszero(val) ? oneunit(hypot(obj...)) : hypot(obj...)
map(Base.Fix2(*, val / omul), obj)
end

Expand Down

0 comments on commit b84e6b2

Please sign in to comment.