equal
deleted
inserted
replaced
244 const int ku = modulo3[k+1]; |
244 const int ku = modulo3[k+1]; |
245 const int kv = modulo3[k+2]; |
245 const int kv = modulo3[k+2]; |
246 const Float lnd = 1.0f / (D[k] + nu * D[ku] + nv * D[kv]); |
246 const Float lnd = 1.0f / (D[k] + nu * D[ku] + nv * D[kv]); |
247 const Float t = (nd - O[k] - nu * O[ku] - nv * O[kv]) * lnd; |
247 const Float t = (nd - O[k] - nu * O[ku] - nv * O[kv]) * lnd; |
248 |
248 |
249 if (!(t < dist && t > 0)) |
249 if (t < 0 || t >= dist) |
250 return false; |
250 return false; |
251 |
251 |
252 Float hu = O[ku] + t * D[ku] - A[ku]; |
252 Float hu = O[ku] + t * D[ku] - A[ku]; |
253 Float hv = O[kv] + t * D[kv] - A[kv]; |
253 Float hv = O[kv] + t * D[kv] - A[kv]; |
254 Float beta = hv * bnu + hu * bnv; |
254 Float beta = hv * bnu + hu * bnv; |