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
Add deprecated messages for the next breaking release (v0.7.0) (#110)
* add deprecated messages to rotation-related functions
* add deprecated messages to argq
* add deprecated messages to normalize-related functions
* update deprecated messages for Quaternion constructor
* fix typo in Base.angle
* add deprecated messages to the `Complex`-`Quaternion` compatibility
* add deprecated messages to `norm` field
* bump version to v0.6.1
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)
40
+
Quaternion(s, a[1], a[2], a[3])
41
+
end
31
42
functionQuaternion(a::AbstractVector)
32
-
Base.depwarn("`Quaternion(::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)
43
+
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)
33
44
Quaternion(0, a[1], a[2], a[3])
34
45
end
35
46
36
47
Base.promote_rule(::Type{Quaternion{T}}, ::Type{S}) where {T <:Real, S <:Real} = Quaternion{promote_type(T, S)}
37
-
Base.promote_rule(::Type{Quaternion{T}}, ::Type{Complex{S}}) where {T <:Real, S <:Real} = Quaternion{promote_type(T, S)}
48
+
function Base.promote_rule(::Type{Quaternion{T}}, ::Type{Complex{S}}) where {T <:Real, S <:Real}
49
+
Base.depwarn("`Complex`-`Quaternion` compatibility is deprecated and will be removed in the next breaking release (v0.7.0).", :Quaternion)
50
+
Quaternion{promote_type(T, S)}
51
+
end
38
52
Base.promote_rule(::Type{Quaternion{T}}, ::Type{Quaternion{S}}) where {T <:Real, S <:Real} = Quaternion{promote_type(T, S)}
39
53
54
+
function Base.getproperty(q::Quaternion, s::Symbol)
55
+
if s ===:norm
56
+
Base.depwarn("The `norm` field is deprecated and will be removed in the next breaking release (v0.7.0).", :Quaternion)
0 commit comments