angle
angle
returns the angle between two 2D points, in degrees.
Import
import { angle } from '@popmotion/popcorn';
Usage
angle(
{ x: 0, y: 0 },
{ x: 0, y: 20 }
) // 90
Types
type Point2D = {
x: number;
y: number;
}
angle(a: Point2D, b: Point2D): number