Page 1 of 1

IMin, IMax, FMin, and FMax

Posted: Wed Dec 16, 2015 1:01 am
by Major Cooke
Pull Request

Simply put, these four functions get the minimum or maximum of the entered integer/floating numbers. Like (f)randompick, you can input as many values as you like.

And for those of you wondering why it's called 'imin/imax', it's because of conflicts with actor.txt. I.e. A_SetRipperMin(int min) causes zdoom to fail start-up. So, it has to be something else. I settled with imin/imax to indicate integer.

Re: IMin, IMax, FMin, and FMax

Posted: Wed Dec 16, 2015 4:29 am
by Graf Zahl
This makes me think that using tokens for function names is a very bad idea that will put new restrictions on the parser for each new function that's getting added.
But in any case: I believe this falls unter 'no new DECORATE functions outside the scripting branch' so I'll leave the decision to Randi.

Re: IMin, IMax, FMin, and FMax

Posted: Wed Dec 16, 2015 8:35 am
by Major Cooke
By functions he means things like IsPointerEqual and CheckClass, I think. And that's because randi was forced to overhaul it entirely, whereas randompick he had nothing to change.