point_in_circle.h 1011 B

123456789101112131415161718192021222324252627282930313233
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_POINT_IN_CIRCLE_H
  9. #define IGL_POINT_IN_CIRCLE_H
  10. #include "igl_inline.h"
  11. namespace igl
  12. {
  13. /// Determine if 2d point is in a circle
  14. /// @param[in] qx x-coordinate of query point
  15. /// @param[in] qy y-coordinate of query point
  16. /// @param[in] cx x-coordinate of circle center
  17. /// @param[in] cy y-coordinate of circle center
  18. /// @param[in] r radius of circle
  19. /// @return true if query point is in circle, false otherwise
  20. IGL_INLINE bool point_in_circle(
  21. const double qx,
  22. const double qy,
  23. const double cx,
  24. const double cy,
  25. const double r);
  26. }
  27. #ifndef IGL_STATIC_LIBRARY
  28. # include "point_in_circle.cpp"
  29. #endif
  30. #endif