Boost.Geometry    Boost C++ Libraries
Classes | Static Public Member Functions | List of all members
boost::geometry::strategy::distance::pythagoras< CalculationType > Class Template Reference

Strategy to calculate the distance between two points. More...

Classes

struct  calculation_type
 

Static Public Member Functions

template<typename P1 , typename P2 >
static calculation_type< P1,
P2 >::type 
apply (P1 const &p1, P2 const &p2)
 applies the distance calculation using pythagoras More...
 

Detailed Description

template<typename CalculationType = void>
class boost::geometry::strategy::distance::pythagoras< CalculationType >

Strategy to calculate the distance between two points.

Template Parameters
CalculationTypenumeric type for calculation (e.g. high precision); if [*void] then it is extracted automatically from the coordinate type and (if necessary) promoted to floating point

Member Function Documentation

template<typename CalculationType = void>
template<typename P1 , typename P2 >
static calculation_type<P1, P2>::type boost::geometry::strategy::distance::pythagoras< CalculationType >::apply ( P1 const &  p1,
P2 const &  p2 
)
static

applies the distance calculation using pythagoras

Returns
the calculated distance (including taking the square root)
Parameters
p1first point
p2second point

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen