Files
modeling-app/docs/kcl-std/functions/std-math-atan.md
2025-06-19 17:08:46 +12:00

1009 B

title, subtitle, excerpt, layout
title subtitle excerpt layout
atan Function in std::math Compute the arctangent of a number. manual

Compute the arctangent of a number.

sketch001 = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> angledLine(angle = atan(1.25), length = 20)
  |> yLine(endAbsolute = 0)
  |> close()

extrude001 = extrude(sketch001, length = 5)

Arguments

Name Type Description Required
num number(_) A number. Yes

Returns

number(rad) - A number.

Description

Consider using atan2() instead for the true inverse of tangent.

Function signature

atan(@num: number(_)): number(rad)

Examples

sketch001 = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> angledLine(angle = atan(1.25), length = 20)
  |> yLine(endAbsolute = 0)
  |> close()

extrude001 = extrude(sketch001, length = 5)