[Added] Exported native double round(double) function to ZScript

Moderator: GZDoom Developers

Exported native double round(double) function to ZScript

Postby m8f » Mon Jun 03, 2019 10: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.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

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

Postby Cherno » Mon Jun 03, 2019 4: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).
User avatar
Cherno
 
Joined: 06 Dec 2016

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

Postby m8f » Mon Jun 03, 2019 7:44 pm

Cherno, Ceil and Floor are already available.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

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

Postby Matt » Mon Jun 03, 2019 8:40 pm

Wanted this for a while, thanks!
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests