Files
modeling-app/docs/kcl/std-math-cos.md
Nick Cameron 3b2abe5814 Declare std kwarg functions in KCL and migrate circle (#5955)
* Support calling KCL std KW fns, and move circle to KCL std

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Doc comments on parameters

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Update grammar

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Change use of counterClockWise to ccw

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-03-24 21:55:24 +13:00

91 KiB

title, excerpt, layout
title excerpt layout
std::math::cos Compute the cosine of a number (in radians). manual

Compute the cosine of a number (in radians).

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

Arguments

Name Type Description Required
num number(rad) Yes

Returns

number(_)

Examples

exampleSketch = startSketchOn(XZ)
  |> startProfileAt([0, 0], %)
  |> angledLine({
    angle = 30,
    length = 3 / cos(toRadians(30)),
  }, %)
  |> yLine(endAbsolute = 0)
  |> close()

example = extrude(exampleSketch, length = 5)

Rendered example of std::math::cos 0