XSIMath.RadiansToDegrees

説明

角をラジアンから角度に変換します。

スクリプト 構文

oDouble = XSIMath.RadiansToDegrees( Radians );

戻り値

Double(浮動小数点値)

パラメータ

パラメータ タイプ 詳細
Radians Double 角の値(ラジアン)

VBScript の例

dim cone  
        set cone = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cone","MeshSurface")   
        cone.Kinematics.Global.Parameters("rotx").value = 10.0  
        cone.Kinematics.Global.Parameters("roty").value = 25.0  
        cone.Kinematics.Global.Parameters("rotz").value = 45.0  
        set oTransfo = cone.Kinematics.Global.Transform
        Call PrintTransfoRotationAnglesInDegrees(oTransfo)  
        Sub PrintTransfoRotationAnglesInDegrees(in_transfo)  
                Dim l_Vec3  
                set l_Vec3 = XSIMath.CreateVector3  
                in_transfo.GetRotationXYZAngles l_Vec3  
                Application.LogMessage "X Rotation angle " & XSIMath.RadiansToDegrees( l_Vec3.X )  
                Application.LogMessage "Y Rotation angle " & XSIMath.RadiansToDegrees( l_Vec3.Y )   
                Application.LogMessage "Z Rotation angle " & XSIMath.RadiansToDegrees( l_Vec3.Z )  
        End Sub  
'Expected output:
'INFO : X Rotation angle 10
'INFO : Y Rotation angle 25
'INFO : Z Rotation angle 45

関連項目

XSIMath.DegreesToRadians