circleintersection.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Returns the intersection area of a bunch of circles (where each circle
  3. * is an object having an x,y and radius property)
  4. */
  5. export declare function intersectionArea(circles: any, stats?: any): number;
  6. /**
  7. * Returns whether a point is contained by all of a list of circles
  8. */
  9. export declare function containedInCircles(point: any, circles: any): boolean;
  10. /** Circular segment area calculation. See http://mathworld.wolfram.com/CircularSegment.html */
  11. export declare function circleArea(r: any, width: any): number;
  12. /** Euclidean distance between two points */
  13. export declare function distance(p1: any, p2: any): number;
  14. /** Returns the overlap area of two circles of radius r1 and r2 - that
  15. have their centers separated by distance d. Simpler faster
  16. circle intersection for only two circles */
  17. export declare function circleOverlap(r1: any, r2: any, d: any): number;
  18. /** Given two circles (containing a x/y/radius attributes),
  19. returns the intersecting points if possible.
  20. note: doesn't handle cases where there are infinitely many
  21. intersection points (circles are equivalent):, or only one intersection point*/
  22. export declare function circleCircleIntersection(p1: any, p2: any): ({
  23. x: any;
  24. y: number;
  25. } | {
  26. x: number;
  27. y: any;
  28. })[];
  29. /** Returns the center of a bunch of points */
  30. export declare function getCenter(points: any): {
  31. x: number;
  32. y: number;
  33. };