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 around inv #133

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Conversation

hyrodium
Copy link
Collaborator

@hyrodium hyrodium commented Nov 6, 2023

  • Add docstring to inv(::Quaternion)
  • Add methods to Base.://

Before this PR

julia> using Quaternions

julia> Quaternion(1,2,3,4) // Quaternion(5,6,7,8)
ERROR: MethodError: no method matching //(::Quaternion{Int64}, ::Quaternion{Int64})

Closest candidates are:
  //(::Number, ::Complex)
   @ Base rational.jl:79
  //(::AbstractArray, ::Number)
   @ Base rational.jl:82

After this PR

julia> using Quaternions

julia> Quaternion(1,2,3,4) // Quaternion(5,6,7,8)
Quaternion{Rational{Int64}}(35//87, 4//87, 0//1, 8//87)

This behavior is consistent with //(::Complex, ::Complex)

julia> complex(1,2) // complex(5,6)
17//61 + 4//61*im

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (89232ef) 100.00% compared to head (bfaf0c6) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #133   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          162       164    +2     
=========================================
+ Hits           162       164    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Can you also bump the patch version for a release?

@hyrodium hyrodium merged commit 2055de5 into JuliaGeometry:main Nov 20, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants