You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base.depwarn("`Quaternion(s::Real, a::AbstractVector)` is deprecated and will be removed in the next breaking release (v0.7.0). Please use `Quaternion(s, a[1], a[2], a[3])` instead.", :Quaternion)
28
-
Quaternion(s, a[1], a[2], a[3])
29
-
end
30
-
functionQuaternion(a::AbstractVector)
31
-
Base.depwarn("`Quaternion(a::AbstractVector)` is deprecated and will be removed in the next breaking release (v0.7.0). Please use `Quaternion(0, a[1], a[2], a[3])` instead.", :Quaternion)
32
-
Quaternion(0, a[1], a[2], a[3])
33
-
end
34
26
35
27
Base.promote_rule(::Type{Quaternion{T}}, ::Type{S}) where {T <:Real, S <:Real} = Quaternion{promote_type(T, S)}
36
28
Base.promote_rule(::Type{Quaternion{T}}, ::Type{Quaternion{S}}) where {T <:Real, S <:Real} = Quaternion{promote_type(T, S)}
@@ -48,15 +40,23 @@ Quaternion{Int64}(7, 0, 0, 0)
48
40
julia> quat(1.0, 2, 3, 4)
49
41
QuaternionF64(1.0, 2.0, 3.0, 4.0)
50
42
51
-
julia> quat([1, 2, 3]) # This output will be changed in the next breaking release for consistency. (#94)
52
-
Quaternion{Int64}(0, 1, 2, 3)
43
+
julia> quat([1, 2, 3])
44
+
3-element Vector{Quaternion{Int64}}:
45
+
Quaternion{Int64}(1, 0, 0, 0)
46
+
Quaternion{Int64}(2, 0, 0, 0)
47
+
Quaternion{Int64}(3, 0, 0, 0)
53
48
```
54
49
"""
55
50
quat
56
51
57
52
quat(p, v1, v2, v3) =Quaternion(p, v1, v2, v3)
58
53
quat(x) =Quaternion(x)
59
-
quat(s, a) =Quaternion(s, a)
54
+
functionquat(A::AbstractArray{T}) where T
55
+
if!isconcretetype(T)
56
+
error("`quat` not defined on abstractly-typed arrays; please convert to a more specific type")
0 commit comments