calculate overlapping time segment range */
| 248 | |
| 249 | /* calculate overlapping time segment range */ |
| 250 | __forceinline range<int> getTimeSegmentRange(const BBox1f& time_range, float numTimeSegments) |
| 251 | { |
| 252 | const float round_up = 1.0f+2.0f*float(ulp); // corrects inaccuracies to precisely match time step |
| 253 | const float round_down = 1.0f-2.0f*float(ulp); |
| 254 | const int itime_lower = (int)max(floor(round_up *time_range.lower*numTimeSegments), 0.0f); |
| 255 | const int itime_upper = (int)min(ceil (round_down*time_range.upper*numTimeSegments), numTimeSegments); |
| 256 | return make_range(itime_lower, itime_upper); |
| 257 | } |
| 258 | |
| 259 | /* calculate overlapping time segment range */ |
| 260 | __forceinline range<int> getTimeSegmentRange(const BBox1f& range, BBox1f time_range, float numTimeSegments) |
no test coverage detected