MathUtils.ToRadian

ToRadian(Vector3)

Convert a Vector3 from degree to radian

public static Vector3 ToRadian(Vector3 degree)
ParameterTypeDescription
degreeVector3The degree value.

Return Value

The radian value.

Examples

Vector3 radians = MathUtils.ToRadian(new Vector3(90, 134, 0));
Console.WriteLine($"Radians = {radians}");

See Also


ToRadian(float)

Convert a number from degree to radian

public static float ToRadian(float degree)
ParameterTypeDescription
degreeSingleThe degree value.

Return Value

The radian value.

Examples

var rad = MathUtils.ToRadian(0.3);
Console.WriteLine($"Radian = {rad}");

See Also


ToRadian(double)

Convert a number from degree to radian

public static double ToRadian(double degree)
ParameterTypeDescription
degreeDoubleThe degree value.

Return Value

The radian value.

Examples

var rad = MathUtils.ToRadian(0.3);
Console.WriteLine($"Radian = {rad}");

See Also


ToRadian(double, double, double)

Convert a vector from degree to radian

public static Vector3 ToRadian(double x, double y, double z)
ParameterTypeDescription
xDoubleThe x component in degree value.
yDoubleThe y component in degree value.
zDoubleThe z component in degree value.

Return Value

The radian value.

See Also