Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ StaticArraysCore = "1.4.3"
Symbolics = "0.1, 1, 2, 3, 4, 5, 6, 7"
Zygote = "0.7.10"
ZygoteRules = "0.2.7"
julia = "1.6"
julia = "1.9"
17 changes: 14 additions & 3 deletions src/Quaternionic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,27 @@ import StaticArrays: StaticArrays, @SMatrix, @SVector, SA, SMatrix, SVector
import LaTeXStrings
import Random: AbstractRNG, default_rng

# The `public` keyword is a syntax error before Julia 1.11, so we wrap it in a macro that
# emits `public` where it exists and does nothing otherwise.
macro public(names)
@static if VERSION ≥ v"1.11.0-DEV.469"
syms = names isa Symbol ? (names,) : names.args
esc(Expr(:public, syms...))
else
nothing
end
end

export AbstractQuaternion
export Quaternion, quaternion,
QuaternionF64, QuaternionF32, QuaternionF16,
imx, imy, imz, 𝐢, 𝐣, 𝐤
export Rotor, rotor, RotorF64, RotorF32, RotorF16
export QuatVec, quatvec, QuatVecF64, QuatVecF32, QuatVecF16
export components, basetype
public value, iszerovalue
public ℂconj, ℂreal, ℂimag, ℂreim
public RB, BR, Rv, vR, KAN
@public value, iszerovalue
@public ℂconj, ℂreal, ℂimag, ℂreim
@public RB, BR, Rv, vR, KAN
export (⋅), (×), (×̂), normalize, norm
export abs2vec, absvec
export from_float_array, to_float_array,
Expand Down
Loading