s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
63 lines • 2.19 kB
TypeScript
/**
* Constants for incircle
*/
export interface InCircleConstants {
bc: Float64Array;
ca: Float64Array;
ab: Float64Array;
aa: Float64Array;
bb: Float64Array;
cc: Float64Array;
u: Float64Array;
v: Float64Array;
axtbc: Float64Array;
aytbc: Float64Array;
bxtca: Float64Array;
bytca: Float64Array;
cxtab: Float64Array;
cytab: Float64Array;
abt: Float64Array;
bct: Float64Array;
cat: Float64Array;
abtt: Float64Array;
bctt: Float64Array;
catt: Float64Array;
_8: Float64Array;
_16: Float64Array;
_16b: Float64Array;
_16c: Float64Array;
_32: Float64Array;
_32b: Float64Array;
_48: Float64Array;
_64: Float64Array;
fin: Float64Array;
fin2: Float64Array;
}
/**
* The points a, b, and c must be in counterclockwise order, or the sign of the result will be reversed.
* @param ax - x coordinate of first point
* @param ay - y coordinate of first point
* @param bx - x coordinate of second point
* @param by - y coordinate of second point
* @param cx - x coordinate of third point
* @param cy - y coordinate of third point
* @param dx - x coordinate of fourth point
* @param dy - y coordinate of fourth point
* @returns - a positive value if the point d lies outside the circle passing through a, b, and c.
* - a negative value if it lies inside.
* - zero if the four points are cocircular.
*/
export declare function incircle(ax: number, ay: number, bx: number, by: number, cx: number, cy: number, dx: number, dy: number): number;
/**
* @param ax - x coordinate of first point
* @param ay - y coordinate of first point
* @param bx - x coordinate of second point
* @param by - y coordinate of second point
* @param cx - x coordinate of third point
* @param cy - y coordinate of third point
* @param dx - x coordinate of comparison point
* @param dy - y coordinate of comparison point
* @returns - point d is in circle if the return value is less than 0, otherwise not in circle
*/
export declare function incirclefast(ax: number, ay: number, bx: number, by: number, cx: number, cy: number, dx: number, dy: number): number;
//# sourceMappingURL=incircle.d.ts.map