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

Remove norm field and update normalization functions #108

Merged
merged 20 commits into from
Dec 1, 2022
Merged

Remove norm field and update normalization functions #108

merged 20 commits into from
Dec 1, 2022

Conversation

sethaxen
Copy link
Collaborator

@sethaxen sethaxen commented Oct 19, 2022

This PR primarily removes the :norm field of Quaternion and updates all code and tests accordingly (fixes #60). It also:

  • removes the normalize overload in favor of sign. (fixes Drop normalize for quaternions #69)
  • renames normalizea to sign_abs (exported)
  • removes normalizea
  • removes argq
  • removes normalizeq (only used internally for argq and makes no sense apart from it)

The first 2 are breaking. I wonder also if we should remove sign_abs. We don't use it internally, and something like sign_abs iss general-purpose and unrelated to quaternions.

Supersedes #75

@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #108 (b519d49) into main (b04badb) will decrease coverage by 0.23%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
- Coverage   98.67%   98.44%   -0.24%     
==========================================
  Files           1        1              
  Lines         227      193      -34     
==========================================
- Hits          224      190      -34     
  Misses          3        3              
Impacted Files Coverage Δ
src/Quaternion.jl 98.44% <100.00%> (-0.24%) ⬇️

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

@hyrodium
Copy link
Collaborator

I wonder also if we should remove sign_abs. We don't use it internally, and something like sign_abs iss general-purpose and unrelated to quaternions.

I agree with removing sign_abs (normalizea).

@sethaxen
Copy link
Collaborator Author

For that matter, should we remove argq? It likewise is not part of the API and is nowhere used internally.

@hyrodium
Copy link
Collaborator

For that matter, should we remove argq? It likewise is not part of the API and is nowhere used internally.

I think the function can be removed too. I also think that the name of the function is not common and inappropriate.

Copy link
Collaborator

@hyrodium hyrodium left a comment

Choose a reason for hiding this comment

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

Added a minor suggestion on a dosctring. I'll review other points after resolving the conflicts.

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

@hyrodium this should be ready for final review.

Copy link
Collaborator

@hyrodium hyrodium left a comment

Choose a reason for hiding this comment

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

Thank you for the updates! LTGM:+1:

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.

Drop normalize for quaternions Do we really need normalized-flag in Quaternion?
2 participants