Values是点到中点的角度数组Points 是点数组- Private Sub SortPoint(ByRef Values As Variant, ByRef Points As Variant, ByVal Count As Integer)
- Dim pTemp As Double, pnt As Variant
- For i = Count To 1 Step -1
- For j = 0 To i - 1
- If Values(j) > Values(j + 1) Then
- pTemp = Values(j + 1)
- Values(j + 1) = Values(j)
- Values(j) = pTemp
- pnt = Points(j + 1)
- Points(j + 1) = Points(j)
- Points(j) = pnt
- End If
- Next j
- Next i
- End Sub
|