Hi Travis,
Unless I'm misunderstanding something, I think your rounding algorithm has a mistake. It will round 0.018 to 1 rather than 2 as desired. I would have thought TRE_VERTEX_KEY_ROUNDUP should just be 0.5f.
Also, for negative numbers it appears that (long) may round up rather than down so that
#define iround(x) (x<0)?((int)(x-0.5))(int)(x+0.5))
is better
Tim
Unless I'm misunderstanding something, I think your rounding algorithm has a mistake. It will round 0.018 to 1 rather than 2 as desired. I would have thought TRE_VERTEX_KEY_ROUNDUP should just be 0.5f.
Also, for negative numbers it appears that (long) may round up rather than down so that
#define iround(x) (x<0)?((int)(x-0.5))(int)(x+0.5))
is better
Tim