UNPKG

@hopeio/utils

Version:
8 lines (7 loc) 276 B
function e(n, t, a, x) { const c = x * Math.PI / 180, o = Math.cos(c), s = Math.sin(c), y = n.x * o - n.y * s - t.x * o + t.y * s, r = n.x * s + n.y * o - t.x * s - t.y * o; return { x: y + a.x, y: r + a.y }; } export { e as translateRotationTransformByPointAndAngle };