Skip to content

Commit 6da3a5b

Browse files
committed
try to make improvements of the simultion data snapshot model
1 parent 3a0b108 commit 6da3a5b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Microsoft.VisualBasic.Core/src/Drawing/PointF3D.vb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)