Setting boundaries for a formula result within formula
I fired up Backyard Football 2002 on ScummVM earlier this week and decided to track my season stats in Numbers... they're all pretty straightforward except one–passer rating.
tl;dr there's an official, very specific formula used by the NFL that requires four calculations for a formula to produce a number from 0 to 158.3. (Here's a link with a calculator for the official passer rating formula.) I'm looking for help because there's a few conditions to calculating it and I don't know how to integrate them into a Numbers formula.
...So what are the conditions?
- If any of the four numbers turn out to be greater than 2.375 (why that specific? dunno–ask the NFL), then they should be capped at 2.375.
- If any turn out to be less than 0, they should be defaulted to 0.
Anyway, is there a way to do this within a formula in Numbers? If so, how? I'll continue in a second post with what I've got so far and a few more details.