@paraebbasta
You need to look down the Adams Guidelines for "Conditional Constructs and Loops", there you would find the conditional statements. Then, as mentioned by @GregLocock make a function based on : if((Length>A)*(Length<B),D1-D2)+D2
Try to use it, take the help of GPT as well.
If you...