Message 1 of 2
cieling or round up

Not applicable
05-07-2009
12:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
--------------------
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.