Evaluating Perks
by in CodeSOD on 2023-12-06Today's anonymous submitter works for a company that handles customer rewards perks. It's handling thousands of dollars of transactions a day, which isn't a huge amount, but it's certainly non-trivial.
Now, there's a conversion formula from points to dollars: points/100*1.7
. Now how would someone implement this complex formula in PHP? Well, our submitter's predecessor did it this way: