PR #8629: cbrt (cube root) for expressions

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
rynn
Posts: 454
Joined: Tue Jul 31, 2018 7:00 am

PR #8629: cbrt (cube root) for expressions

Post by rynn »

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
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: PR #8629: cbrt (cube root) for expressions

Post by adrianinsaval »

Fyi this forum section is just legacy, it isn't really required to post here.
Post Reply