Exported native double round(double) function to ZScript

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: Exported native double round(double) function to ZScript

Re: Exported native double round(double) function to ZScript

by Matt » Mon Jun 03, 2019 7:40 pm

Wanted this for a while, thanks!

Re: Exported native double round(double) function to ZScript

by m8f » Mon Jun 03, 2019 6:44 pm

Cherno, Ceil and Floor are already available.

Re: Exported native double round(double) function to ZScript

by Cherno » Mon Jun 03, 2019 3:55 pm

It would be nice, along with RoundCeiling (I think RoundFloor isn't neccessary as decimal numbers automatically get cut off when cating to an integer).

Exported native double round(double) function to ZScript

by m8f » Mon Jun 03, 2019 9:06 am

PR

Round is very common function, I'm surprised it's not exported yet.

Adding this function to the engine will save some mods from duplicating the tiny bit of code.
Being a native function will make it a bit faster than implemented in ZScript.

Top