Skip to content

Commit

Permalink
Update doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmt committed Jun 11, 2024
1 parent 4ae5628 commit 5ddefcf
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/metrics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ struct GammaCorrection{T<:Real}
end
(f::GammaCorrection)(x::Real) = sign(x)*abs(x)^f.exponent

absdif(x, y) = abs(x - y)
abs2dif(x, y) = abs2(x - y)
"""
ImageMetrics.absdif(x, y) -> abs(x - y)
yields the absolute difference between `x` and `y`.
"""
absdif(x::Number, y::Number) = abs(x - y)

"""
ImageMetrics.abs2dif(x, y) -> abs2(x - y)
yields the squared absolute difference between `x` and `y`.
"""
abs2dif(x::Number, y::Number) = abs2(x - y)

"""
ImageMetrics.distance(x, y; kwds...) -> dist
Expand Down

0 comments on commit 5ddefcf

Please sign in to comment.