From: Denis Davydov Date: Mon, 24 Apr 2017 14:56:24 +0000 (+0200) Subject: rename X-Git-Tag: v9.0.0-rc1~1659^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=335d50c2172ba88b34d0fc7871b3f131360661ce;p=dealii.git rename --- diff --git a/doc/news/changes/minor/20170424DenisDavydov b/doc/news/changes/minor/20170424DenisDavydov index 36a57f5f44..376f234947 100644 --- a/doc/news/changes/minor/20170424DenisDavydov +++ b/doc/news/changes/minor/20170424DenisDavydov @@ -1,4 +1,4 @@ -New: add Point::squared_distance() which calculates the squared +New: add Point::distance_square() which calculates the squared Euclidean distance.
(Denis Davydov, 2017/04/24) diff --git a/include/deal.II/base/point.h b/include/deal.II/base/point.h index 0f2369b512..8048390ca1 100644 --- a/include/deal.II/base/point.h +++ b/include/deal.II/base/point.h @@ -231,7 +231,7 @@ public: * Return the squared Euclidean distance of this point to the point * p. */ - typename numbers::NumberTraits::real_type squared_distance (const Point &p) const; + typename numbers::NumberTraits::real_type distance_square (const Point &p) const; /** * @} @@ -482,7 +482,7 @@ inline typename numbers::NumberTraits::real_type Point::distance (const Point &p) const { - return std::sqrt(squared_distance(p)); + return std::sqrt(distance_square(p)); } @@ -490,7 +490,7 @@ Point::distance (const Point &p) const template inline typename numbers::NumberTraits::real_type -Point::squared_distance (const Point &p) const +Point::distance_square (const Point &p) const { Number sum = Number(); for (unsigned int i=0; i