(arr, x)
| 30069 | |
| 30070 | |
| 30071 | function interp1d(arr, x) { |
| 30072 | var ix = Math.floor(x) |
| 30073 | , fx = x - ix |
| 30074 | , s0 = 0 <= ix && ix < arr.shape[0] |
| 30075 | , s1 = 0 <= ix+1 && ix+1 < arr.shape[0] |
| 30076 | , w0 = s0 ? +arr.get(ix) : 0.0 |
| 30077 | , w1 = s1 ? +arr.get(ix+1) : 0.0 |
| 30078 | return (1.0-fx)*w0 + fx*w1 |
| 30079 | } |
| 30080 | |
| 30081 | function interp2d(arr, x, y) { |
| 30082 | var ix = Math.floor(x) |
no outgoing calls
no test coverage detected
searching dependent graphs…