You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtxVecBase Class > TMtxVecBase Properties > TMtxVecBase.Length Property
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtxVecBase.Length Property

Defines the length in number of samples.

Syntax
C#
Visual Basic
public int Length;

Defines the number of samples that the object can store. The length property does not map directly to memory reallocation when it is changed. Until the amount of preallocated memory is not exceed, there is no reallocation going on. 

Changing the Length property will preserve the existing values, but only if the new property value is smaller than the amount of preallocated memory. To properly resize the memory allocated use the TVec.Resize method. 

It is recommended that vector sizes do not exceed the size of preallocated memory to increase overall performance. The size of preallocated memory can be controlled with the Controller global variable and with the Capacity property.

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!