XMVector2LinePointDistance

Computes the minimum distance between a line and a point.

Syntax

XMVECTOR XMVector2LinePointDistance(
         XMVECTOR LinePoint1,
         XMVECTOR LinePoint2,
         XMVECTOR Point
)  

Parameters

LinePoint1
Type: XMVECTOR 

2D vector describing a point on the line.

LinePoint2
Type: XMVECTOR 

2D vector describing a point on the line.

Point
Type: XMVECTOR 

2D vector describing the reference point.

Return value

Type: XMVECTOR 

Returns a vector. The minimum distance between the line and the point is replicated to each of the components.

Requirements

Header: Declared in directxmath.h.