import { NumberProcessor } from '../typings/function-types'; export declare class Point { private x; private y; private static readonly operands; private readonly subscribers; static isPoint(value: any): boolean; static from(x: number, y: number): Point; static fromPoint(value: Point): Point; static checkPoint(value: Point): void; /** * Default {@link Point} constructor by input parameters * @param x initial input {@link Number} x * @param y initial input {@link Number} y */ constructor(x: number, y: number); /** * Adds point value to this point * @param {Point} point: * @return {Point} thisArg * @chainable */ add(point: Point): Point; /** * Subtracts value from this point * @param {Point} point * @return {Point} thisArg * @chainable */ subtract(point: Point): Point; /** * Adds scalar value to this point * @param {Number} value * @return {Point} thisArg * @chainable */ addScalar(value: number): Point; /** * Scales this point by input value * @param {Number} value * @return {Point} thisArg * @chainable */ scale(value: number): Point; /** * Negate this point * @return {Point} thisArg * @chainable */ negate(): Point; /** * Computes the distance between this point and another point. * @param {Point} point The point to compute the distance with. * @returns {Number} The distance between the 2 points */ distanceTo(point: Point): number; /** * Computes the squared distance between this point and another point. * Useful for optimizing things like comparing distances. * @param {Point} point The point to compute the squared distance with. * @returns {Number} The squared distance between the 2 points */ squaredDistanceTo(point: Point): number; /** * Rotates the point around the specified pivot * From http://stackoverflow.com/questions/4465931/rotate-rectangle-around-a-point * @function * @param degrees degress to rotate around the pivot. * @param {Point} [pivot=(0,0)] Point around which to rotate. * Defaults to the origin. * @returns {Point}. A new point representing the point rotated around the specified pivot */ rotate(degrees: number, pivot: Point): Point; /** * Applies a function to each coordinate of this point and return a new point. * @param {function} func The function to apply to each coordinate. * @returns {Point} A new point with the coordinates computed * by the specified function */ apply(func: NumberProcessor): Point; /** * Divides this point by a value * @param {Number} value * @return {Point} thisArg * @chainable */ divide(value: number): Point; /** * Returns true if this point is less than another one * @return {Boolean} * @param point */ lt(point: Point): boolean; /** * Returns true if this point is less than or equal to another one * @return {Boolean} * @param point */ lte(point: Point): boolean; /** * Returns true if this point is greater another one * @return {Boolean} * @param point */ gt(point: Point): boolean; /** * Returns true if this point is greater than or equal to another one * @return {Boolean} * @param point */ gte(point: Point): boolean; /** * Returns new point which is the result of linear interpolation with this one and another one * @param point * @param {Number} t , position of interpolation, between 0 and 1 default 0.5 * @return {Point} */ lerp(point: Point, t?: number): Point; distanceFrom(point: Point): number; length(): number; /** * Returns the point between this point and another one * @return {Point} * @param point */ midPointFrom(point: Point): Point; /** * Returns a new point which is the min of this and another one * @return {Point} * @param point */ min(point: Point): Point; /** * Returns a new point which is the max of this and another one * @return {Point} * @param point */ max(point: Point): Point; /** * Returns string representation of this point * @return {String} */ toString(): string; /** * Sets x/y of this point * @param {Number} x * @param {Number} y * @chainable */ setXY(x: number, y: number): Point; /** * Sets x of this point * @param {Number} x * @chainable */ setX(x: number): Point; /** * Sets y of this point * @param {Number} y * @chainable */ setY(y: number): Point; /** * Sets x/y of this point from another point * @chainable * @param point */ setFromPoint(point: Point): Point; /** * Swaps x/y of this point and another point * @param point */ swap(point: Point): void; /** * return a cloned instance of the point * @return {Point} */ clone(): Point; /** * Returns true if this point is equal to another one * @return {Boolean} * @param obj */ equals(obj: any): boolean; multiplyBy(...args: Point[]): Point; divideBy(...args: Point[]): Point; addBy(...args: Point[]): Point; subtractBy(...args: Point[]): Point; getX(): number; getY(): number; valueOf(): number; on(event: string, cb: any): void; notify(event: string): void; } //# sourceMappingURL=point.d.ts.map