XSIMath.DegreesToRadians

Description

Converts an angle in degrees to radians.

Scripting Syntax

oDouble = XSIMath.DegreesToRadians( Degrees );

Return Value

Double (floating-point value)

Parameters

Parameter Type Description
Degrees Double angle value in degrees

Examples

VBScript Example

set oCube = Application.ActiveProject.ActiveScene.Root.AddGeometry( "Cube", "MeshSurface" )
set oGlobalTransform = oCube.Kinematics.global.transform
set oRot = XSIMath.CreateRotation
oGlobalTransform.GetRotation oRot
set oVector3 = XSIMath.CreateVector3
oRot.GetXYZAngles oVector3
'Rotate the cube by 30 degrees in y
oVector3.Y = XSIMath.DegreesToRadians( 30 )
oRot.SetFromXYZAngles oVector3
oGlobalTransform.SetRotation oRot
oCube.Kinematics.global.transform = oGlobalTransform

See Also

XSIMath.RadiansToDegrees