From 5e547fb08d6bb7c863e60a4c75ebe73f574f49a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Br=C3=B6nnimann?= Date: Thu, 2 Sep 1999 15:20:31 +0000 Subject: [PATCH] This file was not added into CVS although it should have. Previous versions are unchanged since its creation. --- .../CGAL/Cartesian/distance_computations_2.h | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Old_Packages/C2/include/CGAL/Cartesian/distance_computations_2.h diff --git a/Old_Packages/C2/include/CGAL/Cartesian/distance_computations_2.h b/Old_Packages/C2/include/CGAL/Cartesian/distance_computations_2.h new file mode 100644 index 00000000000..66a020d0463 --- /dev/null +++ b/Old_Packages/C2/include/CGAL/Cartesian/distance_computations_2.h @@ -0,0 +1,68 @@ +// ============================================================================ +// +// Copyright (c) 1998 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------------- +// + +// release : +// release_date : +// +// file : include/CGAL/Cartesian/distance_computations_2.h +// source : include/CGAL/Cartesian/distance_computations_2.h +// revision : $Revision$ +// revision_date : $Date$ +// author(s) : Herve Bronnimann (hbronni@sophia.inria.fr) +// +// coordinator : INRIA Sophia-Antipolis (Herve.Bronnimann@sophia.inria.fr) +// +// ============================================================================ + + +#ifndef CGAL_CARTESIAN_DISTANCE_COMPUTATIONS_2_H +#define CGAL_CARTESIAN_DISTANCE_COMPUTATIONS_2_H + +#include + +#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_2_H +#include +#endif + +CGAL_BEGIN_NAMESPACE + +template < class R > +inline +typename R::FT +squared_distance( PointC2 const& p, + PointC2 const& q) +{ + return squared_distanceC2(p.x(),p.y(),q.x(),q.y()); +} + +template < class R > +inline +typename R::FT +scaled_distance_to_line( LineC2 const& l, + PointC2 const& p) +{ + return scaled_distance_to_lineC2(l.a(),l.b(),l.c(),p.x(),p.y()); +} + +template < class R > +inline +typename R::FT +scaled_distance_to_line( PointC2 const& p, + PointC2 const& q, + PointC2 const& r) +{ + return scaled_distance_to_lineC2(p.x(),p.y(),q.x(),q.y(),r.x(),r.y()); +} + + +CGAL_END_NAMESPACE + +#endif // CGAL_CARTESIAN_DISTANCE_COMPUTATIONS_2_H