Quaternion type: Difference between revisions

→‎{{header|Julia}}: Mark incorrect defining of imag.
(Undo revision 187423 by Peak Looks as if jq and Julia are both wrong in this case.)
(→‎{{header|Julia}}: Mark incorrect defining of imag.)
Line 2,976:
 
=={{header|Julia}}==
{{incorrect|Julia|Although not used, "imag(z)is not z.q1"/ There are three imaginary parts.}}
This is from the [https://github.com/JuliaLang/julia/blob/master/examples/quaternion.jl quaternion example file] included with Julia 0.2, which implements a quaternion type complete with arithmetic, type conversions / promotion rules, polymorphism over arbitrary real numeric types, and pretty-printing:
<lang julia>import Base: convert, promote_rule, show, real, imag, conj, abs, abs2, inv, +, -, /, *
Anonymous user