IMin, IMax, FMin, and FMax

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: IMin, IMax, FMin, and FMax

Re: IMin, IMax, FMin, and FMax

by Major Cooke » Wed Dec 16, 2015 8:35 am

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.

Re: IMin, IMax, FMin, and FMax

by Graf Zahl » Wed Dec 16, 2015 4:29 am

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.

IMin, IMax, FMin, and FMax

by Major Cooke » Wed Dec 16, 2015 1:01 am

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.
Attachments
test.pk3
Summon MCD. Spews out a few numbers, the last two are the lowest and highest (min/max) respectively.
(7.67 KiB) Downloaded 110 times

Top