Skip to content

Why Quaternion isn't type of Number? #29

Closed as not planned
Closed as not planned
@garazha-ilya

Description

@garazha-ilya
  1. 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
  1. Should the following function be implemented?
-(q::Quaternion, x::Real) = Quaternion(real(q) - x, imag(q))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions