agentscape
Version:
Agentscape is a library for creating agent-based simulations. It provides a simple API for defining agents and their behavior, and for defining the environment in which the agents interact. Agentscape is designed to be flexible and extensible, allowing
22 lines (21 loc) • 568 B
TypeScript
export type BoundingBox = {
south: number;
north: number;
west: number;
east: number;
};
export default class GeoLocation {
lat: number;
lon: number;
constructor(lat: number, lon: number);
toCartesian(boundingBox: BoundingBox, xMax: number, yMax: number): {
x: number;
y: number;
};
toString(): string;
/**
* Gives the distance between two points on the Earth's surface using the Haversine formula.
* The returned distance is in meters.
*/
haversineDistance(other: GeoLocation): number;
}