cieling or round up

cieling or round up

Anonymous
Not applicable
259 Views
1 Reply
Message 1 of 2

cieling or round up

Anonymous
Not applicable
Is there a round to next highest integer function or a cieling function?

--------------------
Since noone has answered my question in two weeks on several fourms about using a matrix to export UVs from max coordinate space to another coordinate space, I have resorted to a workaround:

Go through all UVs
Get the maximum V

For all UVs
Set the V component to V_Max - V

However this has a flaw:
If no V lies on the wrapping boundry, incorrect MAX_V results.

Take for example 2 UVs

0, 4.75
0, 4.5

max v would be 4.75
resulting in
4.75 - 4.75 = 0 (incorrect, should be 0.25)
4.75 - 4.5 = .25 (incorrect, should be .5

This workaround sucks because it requires two iterations.
And it doesn't work because of the flaw mentioned, without a rounding function.
0 Likes
260 Views
1 Reply
Reply (1)
Message 2 of 2

Steve_Curley
Mentor
Mentor
Is there a round to next highest integer function or a cieling function?


First place to look would be the Maxscript help. MXS has both the floor and ceil functions built in. Search for "number values".

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes