Skip to content

Commit

Permalink
remove unused show methods (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium authored May 21, 2022
1 parent 12b47a4 commit 0be4cdd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/DualQuaternion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ dualquat(d1, d2, d3, d4) = DualQuaternion(d1, d2, d3, d4)
dualquat(d1, d2, d3, d4, n) = DualQuaternion(d1, d2, d3, d4, n)
dualquat(x) = DualQuaternion(x)

function show(io::IO, dq::DualQuaternion)
show(io, dq.q0)
print(io, " + ( ")
show(io, dq.qe)
print(io, " )du")
end

Q0(dq::DualQuaternion) = dq.q0
Qe(dq::DualQuaternion) = dq.qe

Expand Down
5 changes: 0 additions & 5 deletions src/Octonion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ octo(p, v1, v2, v3, v4, v5, v6, v7, n) = Octonion(p, v1, v2, v3, v4, v5, v6, v7,
octo(x) = Octonion(x)
octo(s, a) = Octonion(s, a)

function show(io::IO, o::Octonion)
pm(x) = x < 0 ? " - $(-x)" : " + $x"
print(io, o.s, pm(o.v1), "im", pm(o.v2), "jm", pm(o.v3), "km", pm(o.v4), "ilm", pm(o.v5), "jlm", pm(o.v6), "klm", pm(o.v7), "lm")
end

real(o::Octonion) = o.s
imag_part(o::Octonion) = (o.v1, o.v2, o.v3, o.v4, o.v5, o.v6, o.v7)
@deprecate imag(o::Octonion) collect(imag_part(o)) false
Expand Down
5 changes: 0 additions & 5 deletions src/Quaternion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ quat(p, v1, v2, v3, n) = Quaternion(p, v1, v2, v3, n)
quat(x) = Quaternion(x)
quat(s, a) = Quaternion(s, a)

function show(io::IO, q::Quaternion)
pm(x) = x < 0 ? " - $(-x)" : " + $x"
print(io, q.s, pm(q.v1), "im", pm(q.v2), "jm", pm(q.v3), "km")
end

real(::Type{Quaternion{T}}) where {T} = T
real(q::Quaternion) = q.s
imag_part(q::Quaternion) = (q.v1, q.v2, q.v3)
Expand Down

0 comments on commit 0be4cdd

Please sign in to comment.