Quaternions.jl Save

A Julia implementation of quaternions

Project README

Quaternions.jl

A Julia implementation of quaternions.

Stable Dev Build Status codecov Aqua QA

Quaternions are best known for their suitability as representations of 3D rotational orientation. They can also be viewed as an extension of complex numbers.

First example

julia> using Quaternions

julia> k = quat(0, 0, 0, 1)
Quaternion{Int64}(0, 0, 0, 1)

julia> j = quat(0, 0, 1, 0)
Quaternion{Int64}(0, 0, 1, 0)

julia> i = j*k
Quaternion{Int64}(0, 1, 0, 0)

julia> i^2 == j^2 == k^2 == i*j*k == -1 # Similar to `im^2`.
true

julia> 1 + i + k + j  # Compatible with arithmetic operations as a `Number`.
Quaternion{Int64}(1, 1, 1, 1)

Check out the docs for further instructions.

In JuliaGeometry organization, there is also Octonions.jl package.

Open Source Agenda is not affiliated with "Quaternions.jl" Project. README Source: JuliaGeometry/Quaternions.jl
Stars
115
Open Issues
10
Last Commit
1 week ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating