Files
modeling-app/docs/kcl-std/functions/std-units-toRadians.md
Nick Cameron 7b7d587141 tests fixups
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-16 12:51:08 +12:00

84 KiB

title, subtitle, excerpt, layout
title subtitle excerpt layout
units::toRadians Function in std::units Converts a number to radians from its current units. manual

Converts a number to radians from its current units.

units::toRadians(@num: number(Angle)): number(rad)

Arguments

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

Returns

number(rad) - A number.

Examples

exampleSketch = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> angledLine(
    angle = 50deg,
    length = 70 * cos(units::toRadians(45deg)),
  )
  |> yLine(endAbsolute = 0)
  |> close()

example = extrude(exampleSketch, length = 5)

Rendered example of units::toRadians 0