, Visual C#


- 9


ByVal pt As myClassPoint3D) As myClassMatrix3D

Dim R1 As Double = Sqrt(pt.orig_coord(0) * _

pt.orig_coord(0) + pt.orig_coord(1) * _

pt.orig_coord(1))

Dim R2 As Double = Sqrt(pt.orig_coord(0) * _

pt.orig_coord(0) + pt.orig_coord(1) * _

pt.orig_coord(1) + pt.orig_coord(2) * _

pt.orig_coord(2))

Dim sphi As Double = -R1 / R1

Dim cphi As Double = -pt.orig_coord(2) / R2

Return New myClassMatrix3D( _

1, 0, 0, 0, _

0, cphi, sphi, 0, _

0, -sphi, cphi, 0, _

0, 0, 0, 1)

End Function

End Class

. Visual C#, Visual C++ 2005 ( ) , , .