Math Utilities

Deg To Rad

Converts angle measurements from degrees to radians using the formula radians = degrees × π/180. Access via MCP in Cursor, Claude Code, or other AI tools, or call GET /v1/math/deg-to-rad directly. For example, 180° becomes π (≈3.14159). Returns precise floating-point results for trigonometric calculations.

API Endpoint

GET /v1/math/deg-to-rad

Code Examples

curl "https://tinyfn.io/v1/math/deg-to-rad" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/math/deg-to-rad', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/math/deg-to-rad',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's math tools:

{
  "mcpServers": {
    "tinyfn-math": {
      "url": "https://tinyfn.io/mcp/math",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I convert degrees to radians in my AI agent workflow?

Use the MCP tool in supported editors like Cursor or Windsurf, or make a GET request to /v1/math/deg-to-rad with your degree value. The conversion uses the standard formula: radians = degrees × π/180.

What's the difference between degrees and radians?

Degrees divide a circle into 360 parts, while radians use the circle's radius as the unit. One full rotation is 360° or 2π radians, making π radians equal to 180°.

Does the deg-to-rad converter handle negative angles?

Yes, negative degree values are converted correctly. For example, -90° becomes -π/2 radians (≈-1.5708).

Why use radians instead of degrees for calculations?

Most programming languages and mathematical functions expect radians for trigonometric operations (sin, cos, tan). Using radians eliminates conversion overhead in computational workflows.

What precision does the degree to radian conversion provide?

Returns standard floating-point precision using the exact π value. Common conversions: 90° = π/2, 180° = π, 270° = 3π/2, 360° = 2π.

Try Deg To Rad Now

Get your free API key and start using Deg To Rad in seconds.

Get Free API Key