From b84e6b247e54df22c4181ecc61402d76e03189db Mon Sep 17 00:00:00 2001 From: Alexander Plavin Date: Tue, 30 Jul 2024 23:36:15 -0400 Subject: [PATCH] Update functionlenses.jl --- src/functionlenses.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functionlenses.jl b/src/functionlenses.jl index fd865b7a..e8a99f00 100644 --- a/src/functionlenses.jl +++ b/src/functionlenses.jl @@ -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