Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Dec 11, 2024
1 parent e156e51 commit d4e1e42
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/conversion.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"""
UnitConversionFactor(x::AbstractFloat)
UnitConversionFactor(x::Float64)
Conversion factor with value `x`.
Used by the [`convfact`](@ref) function in floating point conversion factors
to preserve the precision of quantities.
"""
struct UnitConversionFactor{T<:AbstractFloat} <: AbstractIrrational
x::T
UnitConversionFactor(x::T) where {T<:AbstractFloat} = new{T}(x)
struct UnitConversionFactor <: AbstractIrrational
x::Float64
end

Base.:(==)(a::UnitConversionFactor, b::UnitConversionFactor) = a.x == b.x
Expand Down

0 comments on commit d4e1e42

Please sign in to comment.