This commit is contained in:
Kurt Hutten
2023-03-03 20:35:48 +11:00
committed by GitHub
parent 6446601a67
commit 433c29217e
16 changed files with 172 additions and 297 deletions

View File

@ -78,7 +78,9 @@ const translate: InternalFn = <T extends SketchGroup | ExtrudeGroup>(
const min: InternalFn = (_, a: number, b: number): number => Math.min(a, b)
const legLen: InternalFn = (_, hypotenuse: number, leg: number): number =>
Math.sqrt(hypotenuse ** 2 - Math.min(Math.abs(leg), Math.abs(hypotenuse)) ** 2)
Math.sqrt(
hypotenuse ** 2 - Math.min(Math.abs(leg), Math.abs(hypotenuse)) ** 2
)
const legAngX: InternalFn = (_, hypotenuse: number, leg: number): number =>
(Math.acos(Math.min(leg, hypotenuse) / hypotenuse) * 180) / Math.PI