UNPKG

popmotion

Version:

The animator's toolbox

12 lines (9 loc) 305 B
import { degreesToRadians } from './degrees-to-radians.mjs'; const pointFromVector = (origin, angle, distance) => { angle = degreesToRadians(angle); return { x: distance * Math.cos(angle) + origin.x, y: distance * Math.sin(angle) + origin.y }; }; export { pointFromVector };