UNPKG

create-expo-cljs-app

Version:

Create a react native application with Expo and Shadow-CLJS!

14 lines (12 loc) 428 B
import getAngle from './get-angle'; import { PROPS_CLIENT_XY } from './input-consts'; /** * @private * calculate the rotation degrees between two pointersets * @param {Array} start array of pointers * @param {Array} end array of pointers * @return {Number} rotation */ export default function getRotation(start, end) { return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); }