In order to know what to do, first you’ll have to know what you want to do, what the reasoning is for the particular decision. Once you can describe in formulaic form where you want the item placed, it’s just a matter of figuring out how to write that formula in mathematical form.
I see three basic options,
you want the item (pocket/dart point) to always be a certain distance from one edge.
you want the item to always be a certain percentage of the distance from one edge to another.
you want the item to have a parabolic(?) relation to the edge(s).
Examples:
The pocket is centered at 10cm from the centerline at armscye height.
If the current size is larger than the base size, shift it 0.25 towards the armhole; if the current size is smaller than the base size, shift it 0.25 towards the center front.
No. The math parser in the formulas uses a c++ style syntax.
Ternary Operators
muparser has built in support for the if then else operator. It uses lazy evaluation in order to make sure only the necessary branch of the expression is evaluated.