atan
Compute the arctangent of a number. Returns result in degrees by default, or radians when specified.
Instructions
Arctangent. Result in degrees by default, or radians with unit param.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| unit | No |
Implementation Reference
- cruncher.js:442-461 (schema)Tool definition schema for 'atan' - defines input parameters (value: number, unit: enum degrees/radians), required value, and description.
{ name: "atan", annotations: { title: "Arctangent", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, description: 'Arctangent. Result in degrees by default, or radians with unit param.', inputSchema: { type: "object", properties: { value: { type: "number" }, unit: { type: "string", enum: ["degrees", "radians"] }, }, required: ["value"], }, }, - cruncher.js:1462-1462 (handler)Handler implementation for 'atan' - computes arctangent using Math.atan() and converts the result from radians to the specified unit (degrees/radians) using fromRadians helper.
atan: ({ value, unit }) => fromRadians(Math.atan(value), unit), - cruncher.js:80-80 (registration)Tool registered in the 'standard' tool tier list, making it available when CRUNCHER_TOOL_SET is 'standard' or 'full'.
"sine", "cosine", "tangent", "asin", "acos", "atan", - cruncher.js:1315-1318 (helper)Helper function fromRadians used by atan handler to convert radian result to degrees (or keep radians) based on the unit parameter or global angleMode.
const fromRadians = (radians, unit) => { const resolved = unit || angleMode; return resolved === "degrees" ? radians * (180 / Math.PI) : radians; }; - cruncher.js:140-141 (helper)'atan' listed in MAIN_THREAD_TOOLS set, meaning it runs on the main thread (no worker overhead) for fast execution.
"sine", "cosine", "tangent", "asin", "acos", "atan", // Cache management