Rotate object with .NET
When I rotate an object with this code (after selecting the object ent):
[code]
Dim Pos1 As Point3d
Pos = ent.Position
Dim vRot As Vector3d = Pos.GetVectorTo(New Point3d(Pos.X, Pos.Y, Pos.Z + 100))
ent.TransformBy(Matrix3d.Rotation(3.4159265358979, vRot, Pos))
[/code]the object should be rotated 180 degrees (pi), but it is rotated 196 degrees.
Or am I doing something wrong?
0
Comments
-
3.41592...?
How about 3.141592...0 -
Hi Bert
May be safer to use System.Math.PI
Dan
0 -
Oops, thanks guys.0
This discussion has been closed.