even worse (from some perspectives, anyway) my weekend work is basically all math
just spent like two hours doing pure algebra to figure out and simplify a formula for computing the effective discount when buying Google's committed use discounts at different percentages of overall spend
probably would've been easier if I'd done any of this kind of math recently but eh. it's kinda fun working this stuff out from first principles
@joe_no_body Definitely write those utilities for yourself. I 500% agree that there's just something about building clamp out of min and max that actively fights comprehension, and the time you will save not having to hunt down bugs caused by flipping them will more than make up for the cost of having one more function in your API.
(I still think the lack of clamp is the single largest missing piece in the Java standard library).
@mtomczak yeah. this is also entirely in a Google Sheet so maximizing comprehension feels really worthwhile considering how messy formulas can get