UNPKG

@webviz/subsurface-viewer

Version:

3D visualization component for subsurface reservoir data

7 lines 340 B
// Rotate x,y around x0, y0 rad radians export function rotate(x, y, x0, y0, rad) { const xRot = Math.cos(rad) * (x - x0) - Math.sin(rad) * (y - y0) + x0; // eslint-disable-line const yRot = Math.sin(rad) * (x - x0) + Math.cos(rad) * (y - y0) + y0; // eslint-disable-line return [xRot, yRot]; } //# sourceMappingURL=utils.js.map