UNPKG

@radial-color-picker/angular-color-picker

Version:
30 lines (29 loc) 1.12 kB
/** * Calculates in which quadrant is the point, serves for calculating the right angle. * * @param point x,y coordinates of client's pointer position */ export declare const calculateQuadrant: (point: { x: number; y: number; }) => string; /** * Calculates the distance between two points. * * This variant expects separate x/y values for each point. If you already have * the points as array or object use the corresponding methods. * * @param x1 The X value of the first point. * @param y1 The Y value of the first point. * @param x2 The X value of the second point. * @param y2 The Y value of the second point. * @return The distance between the two points. */ export declare const distanceOfSegmentByXYValues: (x1: number, y1: number, x2: number, y2: number) => number; /** * Calculates the angle of rotation * * @param point x,y coordinates of client's pointer position * @param quadrant one of four quarters of the coordinate plane */ export declare const determineCSSRotationAngle: (point: any, quadrant: any) => number;