(pointOut, pointIn, min, max)
| 347 | } |
| 348 | |
| 349 | function calcIntersection(pointOut, pointIn, min, max) { |
| 350 | var value = pointOut[3]; |
| 351 | |
| 352 | if(value < min) value = min; |
| 353 | if(value > max) value = max; |
| 354 | |
| 355 | var ratio = (pointOut[3] - value) / (pointOut[3] - pointIn[3] + 0.000000001); // we had to add this error to force solve the tiny caps |
| 356 | |
| 357 | var result = []; |
| 358 | for(var s = 0; s < 4; s++) { |
| 359 | result[s] = (1 - ratio) * pointOut[s] + ratio * pointIn[s]; |
| 360 | } |
| 361 | return result; |
| 362 | } |
| 363 | |
| 364 | function inRange(value, min, max) { |
| 365 | return ( |
no outgoing calls
no test coverage detected
searching dependent graphs…