For the complete documentation index, see llms.txt. This page is also available as Markdown.

degtorad

Description

Converts an angle from degrees to radians.

Parameters

  • degrees: The angle in degrees to convert

Returns

Returns the angle converted to radians.

Examples

// Convert 180 degrees to radians
angle = degtorad(180)
// returns approximately 3.14159 (π)

// Convert 90 degrees to radians
angle = degtorad(90)
// returns approximately 1.5708 (π/2)

// Use with trigonometric functions
x = degtorad(45).sin * distance

Last updated