Thanks for the heads-up. I will investigate. When posting my link, I glanced at the code, and the rounding behavior didn't really look right to me either, but I didn't take the time to try to figure out what my original intent had been. (I think perhaps it should have been used as (v.x + ROUNDUP) * PRECISION, but in that case, just using v.x * PRECISION + 0.5 would have been easier. And your comment about negative numbers being broken is obvious in retrospect.) The more I think about it, though, the more I wonder if rounding even makes sense. I'm not using the values stored in the keys for anything other than lookups, so I'm not sure that rounding even adds any value.
T-Junctions re-visited
« Next Oldest | Next Newest »
Users browsing this thread: 9 Guest(s)