File tree Expand file tree Collapse file tree
Microsoft.VisualBasic.Core/src/Drawing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,14 +129,21 @@ Namespace Imaging
129129 Z = index.Z
130130 End Sub
131131
132+ <MethodImpl(MethodImplOptions.AggressiveInlining)>
132133 Public Overrides Function ToString() As String
133134 Return $"[{X}, {Y}, {Z}]"
134135 End Function
135136
137+ <MethodImpl(MethodImplOptions.AggressiveInlining)>
136138 Public Shared Operator -(a As SpatialIndex3D, b As SpatialIndex3D) As SpatialIndex3D
137139 Return New SpatialIndex3D(a.X - b.X, a.Y - b.Y, a.Z - b.Z)
138140 End Operator
139141
142+ <MethodImpl(MethodImplOptions.AggressiveInlining)>
143+ Public Shared Widening Operator CType (xyz As ( Integer , Integer , Integer )) As SpatialIndex3D
144+ Return New SpatialIndex3D(xyz.Item1, xyz.Item2, xyz.Item3)
145+ End Operator
146+
140147 End Structure
141148
142149 ''' <summary>
You can’t perform that action at this time.
0 commit comments