Code:

Private Type Point
X As Double
Y As Double
End Type
Private Const Pi As Double = 3.1415
Private Function RotatePoint(P As Point, AngleInDegrees As Double) As Point
Dim AngleInRadians As Double
Dim RotationMatrix(1, 1) As Double
Dim Result As Point
AngleInRadians = AngleInDegrees * Pi / 180
RotationMatrix(0, 0) = Math.Cos(AngleInRadians)
RotationMatrix(0, 1) = -Math.Sin(AngleInRadians)
RotationMatrix(1, 0) = Math.Sin(AngleInRadians)
RotationMatrix(1, 1) = Math.Cos(AngleInRadians)
Result.X = P.X * RotationMatrix(0, 0) + P.Y * RotationMatrix(0, 1)
Result.Y = P.X * RotationMatrix(1, 0) + P.Y * RotationMatrix(1, 1)
RotatePoint = Result
End Function
Private Sub Form_Load()
Dim Points(9) As Point
Dim RotatedPoints(9) As Point
Dim Index As Integer
For Index = 0 To 9
Points(Index).X = Index
Points(Index).Y = Index
RotatedPoints(Index) = RotatePoint(Points(Index), 90)
Debug.Print (PointToString(Points(Index)) & " " & PointToString(RotatedPoints(Index)))
Next
End Sub
Private Function PointToString(P As Point) As String
Dim Result As String
Result = "X: " & P.X & " " & "Y: " & P.Y
PointToString = Result
End Function

Result:

X: 0 Y: 0 X: 0 Y: 0

X: 1 Y: 1 X: -0,999953672132034 Y: 1,00004632572179

X: 2 Y: 2 X: -1,99990734426407 Y: 2,00009265144359

X: 3 Y: 3 X: -2,9998610163961 Y: 3,00013897716538

X: 4 Y: 4 X: -3,99981468852814 Y: 4,00018530288718

X: 5 Y: 5 X: -4,99976836066017 Y: 5,00023162860897

X: 6 Y: 6 X: -5,9997220327922 Y: 6,00027795433076

X: 7 Y: 7 X: -6,99967570492424 Y: 7,00032428005256

X: 8 Y: 8 X: -7,99962937705627 Y: 8,00037060577435

X: 9 Y: 9 X: -8,99958304918831 Y: 9,00041693149615