Alright, I'm having a bit of trouble with something that seems as though it should be quite easy. I just got back to an annoying problem I had last time I tried to optimize a program, and I was hoping somebody could shed some light on the issue for me.
Here's the situation:
I have a list of cards (L1, for the sake of simplicity I'll just say 1-52) - I want to sort them by suit in L3, with each suit being a different number (1,2,3,4). Now, I currently have it working, but it uses 3 if statements that I can't get rid of for the life of me. Taken from an earlier post of mine, this is what the code currently looks like:
1>L3(theta If L1(theta) GEQ 14:then 2>L3(theta):end If L1(theta) GEQ 27:then 3>L3(theta):end If L1(theta) GEQ 40:then 4>L3(theta):end
Where theta increases by 1 on each loop.
Pretty simple. Now, what I want to do is something similar to the following:
ROUNDUP(L1(theta)/13) --> L3(theta)
So, if the number is a decimal below 0 it will be set to 1, and if the number is something like 14, it will round up to 2 (14/13 > 1, so it would round to 2). This would eliminate a lot of unneeded code, so I was hoping somebody could show me a command that does exactly this, as I can't find one on google or anywhere else. Thanks.