You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » AVL.ResizeSegment

AVL.ResizeSegment

Lengthens or shortens a segment to a new length preserving its orientation and center point.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void ResizeSegment
(
	AvlNet.Segment2D inSegment,
	float inNewLength,
	float inAnchor,
	out AvlNet.Segment2D outSegment
)

Parameters

Name Type Range Default Description
inSegmentAvlNet.Segment2D
inNewLengthfloat<0.0f, INF>1.0fDefault value: 1.0f.
inAnchorfloat<-INF, INF>0.5fDefault value: 0.5f.
outSegmentAvlNet.Segment2D

Examples

ResizeSegment performed on the sample segment, inNewLength = 298.0.

See also