@cornerstonejs/core
Version:
Cornerstone3D Core
13 lines (12 loc) • 403 B
JavaScript
import { EPSILON } from '../constants/index.js';
export default function indexAlmostWithinDimensions(index, dimensions) {
if (index[0] < -EPSILON ||
index[0] >= dimensions[0] + EPSILON ||
index[1] < -EPSILON ||
index[1] >= dimensions[1] + EPSILON ||
index[2] < -EPSILON ||
index[2] >= dimensions[2] + EPSILON) {
return false;
}
return true;
}