import type { Mutable } from "@goldenratio/core-utils"; import type { Point, Rectangle } from "./types/types.js"; /** * Tells if 2 Rectangles are colliding */ export declare function is_rect_colliding(target1: Rectangle, target2: Rectangle): boolean; /** * Tells if Rectangle contains point (Point is inside rectangle) * @returns boolean */ export declare function rect_contains_point(rect: Rectangle, point: Point): boolean; /** * Find angle between 2 points * @returns value in radians */ export declare function angle_between_two_points(p1: Point, p2: Point): number; /** * Creates a vector (Point) from an angle and radius. */ export declare function vec_from_angle(radians: number, radius?: number): Point; /** * Distance between 2 points */ export declare function distance_between_two_points(p1: Point, p2: Point): number; /** * Distance between 2 points * Less accurate, but faster */ export declare function distance_square(p1: Point, p2: Point): number; /** * Copies Rectangle from src to dest */ export declare function copy_rect(dest: Partial>, src: Partial): void; /** * Copies Point from src to dest */ export declare function copy_point(dest: Partial>, src: Partial): void; /** * Rotates a point by a given angle. * @param px * @param py * @param angle_radians The angle to rotate by in radians * @returns a new Point */ export declare function rotate_point(px: number, py: number, angle_radians: number): Point;