UNPKG

@cornerstonejs/core

Version:
6 lines (5 loc) 209 B
export default function isOpposite(v1, v2, tolerance = 1e-5) { return (Math.abs(v1[0] + v2[0]) < tolerance && Math.abs(v1[1] + v2[1]) < tolerance && Math.abs(v1[2] + v2[2]) < tolerance); }