2 ms·
I'm pretty sure you can implement min/max with a Cassowary-style constraint solver using multiple constraints with priorities. For example to get the max betwe
by Jyaif 7y ago
I'm pretty sure you can implement min/max with a Cassowary-style constraint solver using multiple constraints with priorities.
For example to get the max between v0 and v1 you can use those 3 constraints:
[v0 > limit @ priority1, v1 > limit @ priority1, limit == -infinity @ priority0]
|limit| contains the max, which you can use in other constraints.