@@ -105,12 +105,12 @@ RectT{ T}(x::Number, y::Number, z::Number, w::VecTypes{3, <:Number}) where {T}
105105Rect {3 } (x:: Number , y:: Number , z:: Number , w:: VecTypes{3, <:Number} ) = Rect {3 } (Vec (x, y, z), w)
106106Rect {3, T} (x:: Number , y:: Number , z:: Number , w:: VecTypes{3, <:Number} ) where {T} = Rect {3, T} (Vec (x, y, z), w)
107107
108- # copy constructors
108+ # copy constructors (allow explicit truncation)
109109
110- Rect (r:: Rect{N, T} ) where {N, T} = Rect {N, T} (origin (r), widths (r))
111- RectT { T} (r:: Rect{N} ) where {N, T} = Rect {N, T} (origin (r), widths (r))
112- Rect {N } (r:: Rect{N , T} ) where {N, T} = Rect {N, T} (origin (r), widths (r))
113- Rect {N, T} (r:: Rect{N} ) where {N, T} = Rect {N, T} (origin (r), widths (r))
110+ Rect (r:: Rect{N, T} ) where {N, T} = Rect {N, T} (origin (r), widths (r))
111+ RectT { T} (r:: Rect{N} ) where {N, T} = Rect {N, T} (origin (r), widths (r))
112+ Rect {N } (r:: Rect{_N , T} ) where {N, _N, T} = Rect {N, T} (Vec {N, T} ( origin (r)), Vec {N, T} ( widths (r) ))
113+ Rect {N, T} (r:: Rect ) where {N, T} = Rect {N, T} (Vec {N, T} ( origin (r)), Vec {N, T} ( widths (r) ))
114114
115115# dimensional promotion
116116
0 commit comments