> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class Vector

Namespace: [VM.Managed](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed)\
Assembly: VMAppCore.dll

This class is to represent the vector.

```csharp theme={null}
public sealed class Vector : VectorBase
```

#### Inheritance

object ←
[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md) ←
[Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md)

#### Inherited Members

[VectorBase.GetArray()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_GetArray),
[VectorBase.Set(double, double, double)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Set_System_Double_System_Double_System_Double_),
[VectorBase.Set(double\[\])](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase#VM_Managed_VectorBase_Set_System_Double___),
[VectorBase.Set(VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Set_VM_Managed_VectorBase_),
[VectorBase.DotProduct(VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_DotProduct_VM_Managed_VectorBase_),
[VectorBase.CrossProduct(VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_CrossProduct_VM_Managed_VectorBase_),
[VectorBase.GetDistance(VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_GetDistance_VM_Managed_VectorBase_),
[VectorBase.GetOrthoVector(VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_GetOrthoVector_VM_Managed_VectorBase_),
[VectorBase.GetOrthoVector()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_GetOrthoVector),
[VectorBase.MakeUnitVector()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_MakeUnitVector),
[VectorBase.Clone()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Clone),
[VectorBase.ToString()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_ToString),
[VectorBase.Equals(object)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Equals_System_Object_),
[VectorBase.GetObjectData(SerializationInfo, StreamingContext)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_),
[VectorBase.op\_AdditionAssignment(VectorBase, VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_op_AdditionAssignment_VM_Managed_VectorBase_VM_Managed_VectorBase_),
[VectorBase.op\_SubtractionAssignment(VectorBase, VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_op_SubtractionAssignment_VM_Managed_VectorBase_VM_Managed_VectorBase_),
[VectorBase.op\_MultiplicationAssignment(VectorBase, double)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_op_MultiplicationAssignment_VM_Managed_VectorBase_System_Double_),
[VectorBase.op\_MultiplicationAssignment(VectorBase, VectorBase)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_op_MultiplicationAssignment_VM_Managed_VectorBase_VM_Managed_VectorBase_),
[VectorBase.op\_DivisionAssignment(VectorBase, double)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_op_DivisionAssignment_VM_Managed_VectorBase_System_Double_),
[VectorBase.Magnitude](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Magnitude),
[VectorBase.this\[uint\]](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase#VM_Managed_VectorBase_Item_System_UInt32_),
[VectorBase.this\[Coordinate\]](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase#VM_Managed_VectorBase_Item_VM_Coordinate_),
[VectorBase.Z](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Z),
[VectorBase.Y](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_Y),
[VectorBase.X](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md#VM_Managed_VectorBase_X)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### Vector(double\[])

Initializes a new instance of the [Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md) class.

```csharp theme={null}
public Vector(double[] arVec)
```

#### Parameters

`arVec` double\[]

The arVec.

### Vector(double, double, double)

Initializes a new instance of the [Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md) class.

```csharp theme={null}
public Vector(double dX, double dY, double dZ)
```

#### Parameters

`dX` double

The X.

`dY` double

The Y.

`dZ` double

The Z.

### Vector(VectorBase)

Initializes a new instance of the [Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md) class.

```csharp theme={null}
public Vector(VectorBase vec)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vec.

### Vector()

Initializes a new instance of the [Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md) class.

```csharp theme={null}
public Vector()
```

### Vector(SerializationInfo, StreamingContext)

Initializes a new instance of the [Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md) class.

```csharp theme={null}
protected Vector(SerializationInfo info, StreamingContext context)
```

#### Parameters

`info` SerializationInfo

The info.

`context` StreamingContext

The context.

## Properties

### Magnitude

Gets the magnitude of vector(UInt32).

```csharp theme={null}
public override double Magnitude { get; }
```

#### Property Value

double

### X

Gets or sets the X of vector.

```csharp theme={null}
public override double X { get; set; }
```

#### Property Value

double

### Y

Gets or sets the Y of vector.

```csharp theme={null}
public override double Y { get; set; }
```

#### Property Value

double

### Z

Gets or sets the Z of vector.

```csharp theme={null}
public override double Z { get; set; }
```

#### Property Value

double

### this\[uint]

```csharp theme={null}
public override double this[uint n] { get; set; }
```

#### Property Value

double

### this\[Coordinate]

```csharp theme={null}
public override double this[Coordinate n] { get; set; }
```

#### Property Value

double

## Methods

### Clone()

clone.

```csharp theme={null}
public override sealed object Clone()
```

#### Returns

object

The clone.

### CrossProduct(VectorBase)

Cross product.

```csharp theme={null}
public override sealed Vector CrossProduct(VectorBase vec)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vec.

#### Returns

[Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md)

Result of product

### DotProduct(VectorBase)

Dot product.

```csharp theme={null}
public override sealed double DotProduct(VectorBase vec)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vec.

#### Returns

double

Result of product

### GetArray()

Gets the array.

```csharp theme={null}
public override sealed double[] GetArray()
```

#### Returns

double\[]

The array.

### GetDistance(VectorBase)

Gets the distance.

```csharp theme={null}
public override sealed double GetDistance(VectorBase vec)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vec.

#### Returns

double

The distance

### GetObjectData(SerializationInfo, StreamingContext)

Customize the GetObjectData function.

```csharp theme={null}
public override sealed void GetObjectData(SerializationInfo info, StreamingContext __unnamed001)
```

#### Parameters

`info` SerializationInfo

The info.

`__unnamed001` StreamingContext

### GetOrthoVector(VectorBase)

Gets the ortho vector.

```csharp theme={null}
public override sealed Vector GetOrthoVector(VectorBase vecCandidate)
```

#### Parameters

`vecCandidate` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The candidate.

#### Returns

[Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md)

The ortho vector.

### GetOrthoVector()

Gets the ortho vector.

```csharp theme={null}
public override sealed Vector GetOrthoVector()
```

#### Returns

[Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md)

The ortho vector.

### GetSchema()

This method is reserved and should not be used. When implementing the IXmlSerializable interface,
you should return nullNothingnullptra null reference (Nothing in Visual Basic) (Nothing in Visual Basic)
from this method, and instead, if specifying a custom schema is required,
apply the XmlSchemaProviderAttribute to the class.

```csharp theme={null}
public XmlSchema GetSchema()
```

#### Returns

XmlSchema

### MakeUnitVector()

Mate unit vector.

```csharp theme={null}
public override sealed void MakeUnitVector()
```

### ReadXml(XmlReader)

Generates an object from its XML representation.

```csharp theme={null}
public void ReadXml(XmlReader reader)
```

#### Parameters

`reader` XmlReader

The XmlReader stream from which the object is deserialized.

### Set(double, double, double)

Sets the value of vector.

```csharp theme={null}
public override sealed void Set(double dX, double dY, double dZ)
```

#### Parameters

`dX` double

The X.

`dY` double

The Y.

`dZ` double

The Z.

### Set(double\[])

Sets the value of vector.

```csharp theme={null}
public override sealed void Set(double[] arr)
```

#### Parameters

`arr` double\[]

The arr.

### Set(VectorBase)

Sets the value of vector.

```csharp theme={null}
public override sealed void Set(VectorBase vec)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vec.

### WriteXml(XmlWriter)

Converts an object into its XML representation.

```csharp theme={null}
public void WriteXml(XmlWriter writer)
```

#### Parameters

`writer` XmlWriter

The XmlWriter stream to which the object is serialized.

## Operators

### implicit operator Vector(Vector)

```csharp theme={null}
public static implicit operator Vector(Vector vec)
```

#### Parameters

`vec` Vector

#### Returns

[Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md)

### implicit operator Vector(Vector)

```csharp theme={null}
public static implicit operator Vector(Vector vec)
```

#### Parameters

`vec` [Vector](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.Vector.md)

#### Returns

Vector
