-
Notifications
You must be signed in to change notification settings - Fork 33
Fix deprecations #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deprecations #109
Conversation
src/fixed.jl
Outdated
@@ -10,8 +10,8 @@ end | |||
Fixed{T, f}(x::AbstractChar) where {T,f} = throw(ArgumentError("Fixed cannot be constructed from a Char")) | |||
Fixed{T, f}(x::Complex) where {T,f} = Fixed{T, f}(convert(real(typeof(x)), x)) | |||
Fixed{T, f}(x::Base.TwicePrecision) where {T,f} = Fixed{T, f}(convert(Float64, x)) | |||
Fixed{T,f}(x::Integer) where {T,f} = Fixed{T,f}(round(T, convert(widen1(T),x)<<f),0) | |||
Fixed{T,f}(x::AbstractFloat) where {T,f} = Fixed{T,f}(round(T, trunc(widen1(T),x)<<f + rem(x,1)*(one(widen1(T))<<f)),0) | |||
Fixed{T,f}(x::Integer) where {T,f} = Fixed{T,f}(round(T, digits=convert(widen1(T),x)<<f),0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad bot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.
src/normed.jl
Outdated
round(::Type{T}, x::Normed) where {T <: Integer} = round(T, reinterpret(x)/rawone(x)) | ||
floor(::Type{T}, x::Normed) where {T <: Integer} = trunc(T, x) | ||
ceil(::Type{T}, x::Normed) where {T <: Integer} = ceil(T, reinterpret(x)/rawone(x)) | ||
trunc(::Type{T}, digits=x::Normed) where {T <: Integer} = convert(T, div(reinterpret(x), rawone(x))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad bot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.
src/normed.jl
Outdated
ceil(::Type{T}, x::Normed) where {T <: Integer} = ceil(T, reinterpret(x)/rawone(x)) | ||
trunc(::Type{T}, digits=x::Normed) where {T <: Integer} = convert(T, div(reinterpret(x), rawone(x))) | ||
round(::Type{T}, digits=x::Normed) where {T <: Integer} = round(T, digits=reinterpret(x)/rawone(x)) | ||
floor(::Type{T}, digits=x::Normed) where {T <: Integer} = trunc(T, digits=x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad bot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.
test/normed.jl
Outdated
@test round(Int,x) == round(Int,xf) | ||
@test floor(Int,x) == floor(Int,xf) | ||
@test trunc(Int, digits=x) == trunc(Int, digits=xf) | ||
@test round(Int, digits=x) == round(Int, digits=xf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad bot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.
My code has been updated. I now view the world differently. |
652411a
to
d3157a2
Compare
Codecov Report
@@ Coverage Diff @@
## master #109 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 3
Lines 111 111
=====================================
Hits 111 111
Continue to review full report at Codecov.
|
I fixed a number of deprecations for you