sine
Compute the sine of an angle, using degrees by default or radians when specified. Returns the trigonometric sine value.
Instructions
Sine. Angle in degrees by default, or radians with unit: "radians".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| angle | Yes | ||
| unit | No |
Implementation Reference
- cruncher.js:335-354 (schema)Schema definition for the 'sine' tool: accepts an angle number and optional unit (degrees/radians), angle is required.
{ name: "sine", annotations: { title: "Sine", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, description: 'Sine. Angle in degrees by default, or radians with unit: "radians".', inputSchema: { type: "object", properties: { angle: { type: "number" }, unit: { type: "string", enum: ["degrees", "radians"] }, }, required: ["angle"], }, }, - cruncher.js:1385-1385 (handler)Handler implementation for the 'sine' tool: converts the angle to radians via toRadians() (using the global angleMode or provided unit), then calls Math.sin().
sine: ({ angle, unit }) => Math.sin(toRadians(angle, unit)), - cruncher.js:1298-1301 (helper)Helper function toRadians that converts degrees to radians, using global angleMode if no unit is specified.
const toRadians = (angle, unit) => { const resolved = unit || angleMode; return resolved === "degrees" ? angle * (Math.PI / 180) : angle; }; - cruncher.js:69-80 (registration)Tool tier registration: 'sine' is listed in the 'standard' tool set (34 tools), making it available by default.
standard: [ "evaluate_expression", "add", "subtract", "multiply", "divide", "sqrt", "power", "absolute", "modulo", "factorial", "logarithm", "natural_log", "get_constant", "sine", "cosine", "tangent", "asin", "acos", "atan", "set_angle_mode", "get_angle_mode", "sum", "avg", "min", "max", "count", "variance", "std_dev", "percentage_of", "percentage_change", "percentage_reverse", "median", "range", "convert_unit", ], - cruncher.js:130-134 (registration)MAIN_THREAD_TOOLS set includes 'sine', meaning it runs directly in the main thread without spawning a worker.
const MAIN_THREAD_TOOLS = new Set([ // Angle management "set_angle_mode", "get_angle_mode", // Trigonometry (instant Math calls) "sine", "cosine", "tangent", "asin", "acos", "atan",