7 lines
208 B
JavaScript
7 lines
208 B
JavaScript
import { radiansToDegrees } from './radians-to-degrees.mjs';
|
|
import { zeroPoint } from './inc.mjs';
|
|
|
|
const angle = (a, b = zeroPoint) => radiansToDegrees(Math.atan2(b.y - a.y, b.x - a.x));
|
|
|
|
export { angle };
|