NUMmetrics.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _NUMmetrics_h_
  2. #define _NUMmetrics_h_
  3. /* NUMmetrics.h
  4. *
  5. * Copyright (C) 1992-2018 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. /********** Metrics **********/
  21. int NUMrotationsPointInPolygon
  22. (double x0, double y0, integer n, double x [], double y []);
  23. /*
  24. Returns the number of times that the closed polygon
  25. (x [1], y [1]), (x [2], y [2]),..., (x [n], y [n]), (x [1], y [1]) encloses the point (x0, y0).
  26. The result is positive if the polygon encloses the point in the
  27. anti-clockwise direction, and negative if the direction is clockwise.
  28. The result is 0 if the point is outside the polygon.
  29. If the point is on the polygon, the result is unpredictable.
  30. */
  31. /* End of file NUMmetrics.h */
  32. #endif