# Magnum::Math::Geometry::Distance namespace#include <Magnum/Math/Geometry/Distance.h>

• Reference

## Functions

template<class T>
auto linePointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) -> T deprecated in 2018.10
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 deprecated in 2018.10
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 deprecated in 2018.10
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 deprecated in 2018.10
Distance of line and point in 3D.
template<class T>
const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) -> T deprecated in 2018.10
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 deprecated in 2018.10
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 deprecated in 2018.10
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 deprecated in 2018.10
Dístance of point from line segment in 3D.
template<class T>
auto pointPlaneScaled(const Vector3<T>& point, const Vector4<T>& plane) -> T deprecated in 2018.10
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 deprecated in 2018.10
Distance of point from plane.
template<class T>
auto pointPlaneNormalized(const Vector3<T>& point, const Vector4<T>& plane) -> T deprecated in 2018.10
Distance of point from plane with normalized normal.

## Function documentation

### template<class T> T Magnum::Math::Geometry::Distance::linePointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point)

Distance of line and point in 2D, squared.

### template<class T> T Magnum::Math::Geometry::Distance::linePoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point)

Distance of line and point in 2D.

### template<class T> T Magnum::Math::Geometry::Distance::linePointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point)

Distance of line and point in 3D, squared.

### template<class T> T Magnum::Math::Geometry::Distance::linePoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point)

Distance of line and point in 3D.

### template<class T> T Magnum::Math::Geometry::Distance::lineSegmentPointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point)

Distance of point from line segment in 2D, squared.

### template<class T> T Magnum::Math::Geometry::Distance::lineSegmentPoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point)

Dístance of point from line segment in 2D.

### template<class T> T Magnum::Math::Geometry::Distance::lineSegmentPointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point)

Distance of point from line segment in 3D, squared.

### template<class T> T Magnum::Math::Geometry::Distance::lineSegmentPoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point)

Dístance of point from line segment in 3D.

### template<class T> T Magnum::Math::Geometry::Distance::pointPlaneScaled(const Vector3<T>& point, const Vector4<T>& plane)

Distance of point from plane, scaled by the length of the planes normal.

### template<class T> T Magnum::Math::Geometry::Distance::pointPlane(const Vector3<T>& point, const Vector4<T>& plane)

Distance of point from plane.

### template<class T> T Magnum::Math::Geometry::Distance::pointPlaneNormalized(const Vector3<T>& point, const Vector4<T>& plane)

Distance of point from plane with normalized normal.