# Magnum/Math/Distance.h file

Namespace Magnum::Math::Distance.

## Namespaces

namespace Magnum
Root namespace.
namespace Magnum::Math
Math library.
namespace Magnum::Math::Distance
Functions for calculating distances.

## Functions

template<class T>
auto pointPointSquared(const Vector2<T>& a, const Vector2<T>& b) -> T new in Git master
Distance of two points in 2D, squared.
template<class T>
auto pointPoint(const Vector2<T>& a, const Vector2<T>& b) -> T new in Git master
Distance of two points in 2D.
template<class T>
auto pointPointSquared(const Vector3<T>& a, const Vector3<T>& b) -> T new in Git master
Distance of two points in 3D, squared.
template<class T>
auto pointPoint(const Vector3<T>& a, const Vector3<T>& b) -> T new in Git master
Distance of two points in 3D.
template<class T>
auto linePointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) -> T
Distance of line and point in 2D, squared.
template<class T>
auto linePoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) -> T
Distance of line and point in 2D.
template<class T>
auto linePointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) -> T
Distance of line and point in 3D, squared.
template<class T>
auto linePoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) -> T
Distance of line and point in 3D.
template<class T>
const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) -> T
Distance of point from line segment in 2D, squared.
template<class T>
auto lineSegmentPoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) -> T
Dístance of point from line segment in 2D.
template<class T>
const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) -> T
Distance of point from line segment in 3D, squared.
template<class T>
auto lineSegmentPoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) -> T
Dístance of point from line segment in 3D.
template<class T>
auto pointPlaneScaled(const Vector3<T>& point, const Vector4<T>& plane) -> T
Distance of point from plane, scaled by the length of the planes normal.
template<class T>
auto pointPlane(const Vector3<T>& point, const Vector4<T>& plane) -> T
Distance of point from plane.
template<class T>
auto pointPlaneNormalized(const Vector3<T>& point, const Vector4<T>& plane) -> T
Distance of point from plane with normalized normal.