point_in_circle.h 622 B

123456789101112131415161718192021222324252627
  1. #ifndef IGL_POINT_IN_CIRCLE_H
  2. #define IGL_POINT_IN_CIRCLE_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Determine if 2d point is in a circle
  7. // Inputs:
  8. // qx x-coordinate of query point
  9. // qy y-coordinate of query point
  10. // cx x-coordinate of circle center
  11. // cy y-coordinate of circle center
  12. // r radius of circle
  13. // Returns true if query point is in circle, false otherwise
  14. IGL_INLINE bool point_in_circle(
  15. const double qx,
  16. const double qy,
  17. const double cx,
  18. const double cy,
  19. const double r);
  20. }
  21. #ifdef IGL_HEADER_ONLY
  22. # include "point_in_circle.cpp"
  23. #endif
  24. #endif