JuliaGeometry / Quaternions.jl

A Julia implementation of quaternions
https://juliageometry.github.io/Quaternions.jl
MIT License
116 stars 37 forks source link

Remove norm field and update normalization functions #108

Closed sethaxen closed 1 year ago

sethaxen commented 1 year ago

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

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[bot] commented 1 year ago

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%) :arrow_down:

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

hyrodium commented 1 year ago

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 commented 1 year ago

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

hyrodium commented 1 year ago

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.

sethaxen commented 1 year ago

@hyrodium this should be ready for final review.