Files
modeling-app/docs/kcl-std/functions/std-math-legLen.md
Nick Cameron b19acd550d Type check and coerce arguments to user functions and return values from std Rust functions (#6958)
* Shuffle around function call code

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

* Refactor function calls to share more code

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

* Hack to leave the result of revolve as a singleton rather than array

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

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-19 16:50:15 +12:00

770 B

title, subtitle, excerpt, layout
title subtitle excerpt layout
legLen Function in std::math Compute the length of the given leg. manual

Compute the length of the given leg.

legLen(
  hypotenuse: number(Length),
  leg: number(Length),
): number(Length)

Arguments

Name Type Description Required
hypotenuse number(Length) The length of the triangle's hypotenuse. Yes
leg number(Length) The length of one of the triangle's legs (i.e. non-hypotenuse side). Yes

Returns

number(Length) - A number.

Examples

legLen(hypotenuse = 5, leg = 3)