Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

3fcf1f10 6ba9 7bd6 6a07 681eec801c2b

haplokuon edited this page May 6, 2023 · 1 revision

PointLineDistance(Vector2, Vector2, Vector2) Method

netDxf 3.0.0 Library

Calculates the minimum distance between a point and a line.

Definition

Namespace: netDxf
Assembly: netDxf (in netDxf.dll) Version: 3.0.0

C#

public static double PointLineDistance(
	Vector2 p,
	Vector2 origin,
	Vector2 dir
)

VB

Public Shared Function PointLineDistance ( 
	p As Vector2,
	origin As Vector2,
	dir As Vector2
) As Double

C++

public:
static double PointLineDistance(
	Vector2 p, 
	Vector2 origin, 
	Vector2 dir
)

F#

static member PointLineDistance : 
        p : Vector2 * 
        origin : Vector2 * 
        dir : Vector2 -> float 

Parameters

  Vector2
A point.
  Vector2
Line origin point.
  Vector2
Line direction.

Return Value

Double
The minimum distance between the point and the line.

See Also

Reference

MathHelper Class
PointLineDistance Overload
netDxf Namespace

Clone this wiki locally