Closed
Description
when mixing Gray
with Number
the type of the result depends on the order of the inputs:
julia> using ColorVectorSpace, Colors
julia> 2.0 / Gray(2.0)
1.0
julia> Gray(2.0) / 2.0
Gray{Float64}(1.0)
julia> Gray(2.0) / Gray(2.0)
1.0
my feeling is that the results should always be Gray
, but wanted to ask for opinions before submitting a PR to fix it, as a whole a lot has to be changed, for all of +
and -
always returns Number
when the inputs are of mixed types:
julia> Gray(2.0)+Gray(2.0)
Gray{Float64}(4.0)
julia> Gray(2.0)+2.0
4.0
julia> 2.0+Gray(2.0)
4.0
Metadata
Metadata
Assignees
Labels
No labels