Skip to content
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

update quat(::Array) to return Array{<:Quaternion} #95

Merged
merged 11 commits into from
Dec 7, 2022

Conversation

hyrodium
Copy link
Collaborator

This PR fixes #94.
Note that this PR is considered as a breaking change.

@test quat(1, [2, 3, 4]) === Quaternion(1, 2, 3, 4)
@test quat([2, 3, 4]) === Quaternion(0, 2, 3, 4)

@hyrodium hyrodium mentioned this pull request Sep 17, 2022
@hyrodium
Copy link
Collaborator Author

I'm keeping this PR draft because I'm not sure whether the quat behavior in #94 is intended or not.

@hyrodium hyrodium mentioned this pull request Dec 1, 2022
@hyrodium
Copy link
Collaborator Author

hyrodium commented Dec 1, 2022

I'll remove some methods such as

function Quaternion(s::Real, a::AbstractVector)
    Base.depwarn("`Quaternion(s::Real, a::AbstractVector)` is deprecated and will be removed in the next breaking release (v0.7.0). Please use `Quaternion(s, a[1], a[2], a[3])` instead.", :Quaternion)
    Quaternion(s, a[1], a[2], a[3])
end

after merging #111 and #113 to avoid making conflicts.

@hyrodium hyrodium marked this pull request as ready for review December 7, 2022 00:37
@hyrodium hyrodium requested a review from sethaxen December 7, 2022 00:39
@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Merging #95 (67a5d5f) into main (bdf34b9) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   99.20%   99.18%   -0.02%     
==========================================
  Files           1        1              
  Lines         126      123       -3     
==========================================
- Hits          125      122       -3     
  Misses          1        1              
Impacted Files Coverage Δ
src/Quaternion.jl 99.18% <100.00%> (-0.02%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@sethaxen sethaxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just 2 fixes needed.

src/Quaternion.jl Outdated Show resolved Hide resolved
src/Quaternion.jl Show resolved Hide resolved
Copy link
Collaborator

@sethaxen sethaxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hyrodium hyrodium merged commit 0f57093 into JuliaGeometry:main Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quat([1,2,3,4]) should return Vector{Quaternion{Int}}
2 participants