- It's just a matter of curiosity. But why is a Quaternion not a subtype of Number?
Like in complex.jl:
struct Complex{T<:Real} <: Number
re::T
im::T
end
- Should the following function be implemented?
-(q::Quaternion, x::Real) = Quaternion(real(q) - x, imag(q))