export type WorldXZ = readonly [number, number]; /** * Compass bearing (radians, 0 = map north = −Z, increasing clockwise toward +X * = east) from one world XZ point to another. Feeds both the minimap direction * and the compass strip. */ export declare function compassBearing(from: WorldXZ, to: WorldXZ): number; /** Bearing of an entity facing direction given its `rotationY` (yaw) in radians. */ export declare function headingToBearing(yaw: number): number; export type Cardinal = "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW"; export declare function bearingToCardinal(bearing: number): Cardinal; /** Signed offset of `bearing` from `reference`, wrapped into (−π, π]. */ export declare function relativeBearing(bearing: number, reference: number): number; export interface MinimapView { /** World XZ at the minimap center (usually the player position). */ center: WorldXZ; /** World-unit distance from center to the minimap edge. */ worldRadius: number; /** Pixel diameter of the minimap. */ size: number; /** * Compass bearing that points up (rotating minimap) — pass * `headingToBearing(yaw)` so the map spins under a fixed north-up player * arrow. Omit for north-up. */ rotate?: number; } export interface MinimapPoint { x: number; y: number; /** Radial distance in world units. */ distance: number; /** True when within `worldRadius` of center. */ inside: boolean; } /** * Project a world XZ (or XYZ) point into minimap pixel space. Origin is the * top-left of the `size×size` box; north (−Z) maps to −Y (up). Pass * `view.rotate` to spin the map under a fixed north-up player arrow. */ export declare function projectToMinimap(world: WorldXZ | readonly [number, number, number], view: MinimapView): MinimapPoint; /** * Invert `projectToMinimap` (#285.6): minimap pixel → world XZ, rotate-aware — * click-to-pin, tap-to-ping, drag-to-set-waypoint map interactions. */ export declare function unprojectFromMinimap(point: { x: number; y: number; }, view: MinimapView): WorldXZ; /** Clamp a projected point to the minimap edge, preserving direction (edge markers). */ export declare function clampToMinimapEdge(point: MinimapPoint, size: number): { x: number; y: number; };