+
Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Conversation

sritchie
Copy link
Member

@sritchie sritchie commented Jan 19, 2022

  • Quaternion implementation #461 adds sicmutils.quaternion, with a full arithmetic implementation and
    the beginnings of a rotation API. Quaternions are implemented like vectors of
    length 4, and implement all appropriate Clojure protocols. All arithmetic is
    compatible with all scalars and complex numbers.

    • Accessors: get-r, real-part, get-i, get-j, get-k, complex-1,
      complex-2, ->complex-pair, ->vector, three-vector

    • Predicates: real?, zero?, one?, pure?, unit?

    • Constants: ZERO, ONE, I, J, K

    • Reader literal #sicm/quaternion takes a 4-vector or a single entry.

    • Constructors: make, from-complex, spherical, semipolar,
      multipolar, cylindrospherical, cylindrical

    • More: arity, evaluate, partial-derivative, magnitude-sq,
      normalize, commutator

    • Transcendental functions: exp log, cos, sin, tan sinh, cosh,
      tanh. Many more transcendentals will work, thanks to their default
      implementations.

    • Arithmetic and generics: +, -, *, /, dot-product, cross-product,
      conjugate, magnitude, expt, sqrt, simplify, infinite?,
      solve-linear-right, solve-linear

    • Rotation-related: from-angle-normal-axis, from-angle-axis, pitch,
      roll, yaw, ->angle-axis

@sritchie sritchie added type New data type. kernel Remaining items from scmutils kernel. labels Jan 19, 2022
Base automatically changed from sritchie/sinc to main January 20, 2022 02:19
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2022

Codecov Report

Merging #461 (1613c82) into main (913ccf7) will increase coverage by 0.27%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
+ Coverage   85.82%   86.10%   +0.27%     
==========================================
  Files          99      100       +1     
  Lines       13613    14171     +558     
  Branches      716      740      +24     
==========================================
+ Hits        11684    12202     +518     
- Misses       1213     1229      +16     
- Partials      716      740      +24     
Impacted Files Coverage Δ
src/sicmutils/complex.cljc 94.90% <ø> (+1.27%) ⬆️
src/sicmutils/env.cljc 93.33% <ø> (ø)
src/sicmutils/quaternion.cljc 88.86% <88.86%> (ø)
src/sicmutils/env/sci.cljc 96.87% <100.00%> (+0.03%) ⬆️
src/sicmutils/rational_function.cljc 81.17% <0.00%> (-0.29%) ⬇️
src/sicmutils/numsymb.cljc 92.46% <0.00%> (ø)
src/sicmutils/polynomial.cljc 83.41% <0.00%> (ø)
src/sicmutils/generic.cljc 84.56% <0.00%> (+4.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 913ccf7...1613c82. Read the comment docs.

@sritchie sritchie changed the title Quaternion implementation redux Quaternion implementation Jan 21, 2022
@sritchie sritchie self-assigned this Jan 22, 2022
@sritchie sritchie merged commit 348e471 into main Jan 22, 2022
@sritchie sritchie deleted the sritchie/quat2 branch January 22, 2022 16:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

kernel Remaining items from scmutils kernel. type New data type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载