You are here: Start » AVL.NET » AVL.SegmentNormalVector

# AVL.SegmentNormalVector

Computes an unitary vector perpendicular to the segment.

Namespace: AvlNet AVL.NET.dll

### Syntax

C++
C#

public static void SegmentNormalVector
(
AvlNet.Segment2D inSegment,
bool inReverse,
out AvlNet.Vector2D outNormalVector
)


### Parameters

Name Type Range Default Description
inSegmentAvlNet.Segment2D
inReverseboolTrueDefault value: True.
outNormalVectorAvlNet.Vector2D

### Description

Note that because of inaccuracies of floating-point arithmetic, some geometric operations (including this one) may lead to unpredictable results for degenerated cases. In this filter such a case occurs when an empty segment is given on input.

### Examples

SegmentNormalVector performed on a segment with parameters: X1 = 50, Y1 = 50, X2 = 300, Y2 = 300.
outNormalVector result shown on the right picture.