image-js
Version:
Image processing and manipulation in JavaScript
19 lines • 811 B
TypeScript
import type { Point } from '../../utils/geometry/points.js';
/**
* The angle in radians of a vector relatively to the x axis.
* The angle is positive in the clockwise direction.
* This is an optimized version because it assumes that one of
* the points is on the line y = 0.
* @param p1 - First point.
* @param p2 - Second point.
* @returns Rotation angle in radians to make the line horizontal. -π <= angle <= π.
*/
export declare function getAngle(p1: Point, p2: Point): number;
/**
* Compute the clockwise angle in radians between the x-axis and the segment p1-p2.
* @param p1 - First point.
* @param p2 - Second point.
* @returns Clockwise angle between x-axis and the segment.
*/
export declare function getClockwiseAngle(p1: Point, p2: Point): number;
//# sourceMappingURL=getAngle.d.ts.map