This adds a function cbrt(arg) to the freecad-expressions that computes the cube root of arg. Instead of arg^(1/3) this handles the units of the argument, so that one can compute units from p.e. ml to mm.
cbrt(27 ml) → 30 mm
instead of
(27 ml)^(1/3) → 30
For cbrt() take a look at the description of the c++ function cbrt() esp. Notes.
⚠ I added the enum after sqrt, so renumbering following enums, hope this is O.K.
PR #8629
PR #8629: cbrt (cube root) for expressions
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- adrianinsaval
- Veteran
- Posts: 5548
- Joined: Thu Apr 05, 2018 5:15 pm
Re: PR #8629: cbrt (cube root) for expressions
Fyi this forum section is just legacy, it isn't really required to post here.