Skip to content

Commit

Permalink
Fixed multiplying by value in Quantity projector, should be just units
Browse files Browse the repository at this point in the history
  • Loading branch information
SBuercklin committed Dec 6, 2021
1 parent 6511482 commit d4e0fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chainrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end

function (projector::ProjectTo{<:Quantity})(x::Number)
new_val = projector.project_val(ustrip(x))
return new_val*x
return new_val*unit(x)
end

# Project Unitful Quantities onto numerical types by projecting the value and carrying units
Expand Down

0 comments on commit d4e0fc8

Please sign in to comment.