---
title: "VecD"
description: "API documentation for VecD"
url: https://developer.disguise.one/python-api/docs/vecd/
---

# VecD

3D vector of double precision values.

A direct copy of Vec, except for replacing ‘float’ with ‘double’.

See also: [Utility Guide](/plugins/guides/utility)

Base class: _\_BlipValue_

## Properties

#### **maxComponent** : _float_ _(Read-Only)_

Maximum component of the vector.

#### **minComponent** : _float_ _(Read-Only)_

Minimum component (x, y, or z) of the vector.

The minimum component of the vector.

#### **x** : _float_

The x component of the vector.

_UserName: X_

#### **y** : _float_

The y component of the vector.

_UserName: Y_

#### **z** : _float_

The z component of the vector.

_UserName: Z_

## Constructors

#### **\_\_init\_\_**(self)

#### **\_\_init\_\_**(self, \_x: _float_, \_y: _float_)

#### **\_\_init\_\_**(self, \_x: _float_, \_y: _float_, \_z: _float_)

#### **\_\_init\_\_**(self, v: _[Vec2](/python-api/docs/vec2#vec2)_)

#### **\_\_init\_\_**(self, v: _[Vec](/python-api/docs/vec#vec)_)

#### **\_\_init\_\_**(self, other: _[VecD](/python-api/docs/vecd#vecd)_)

Copy constructor for VecD

## Methods

#### **angles**(self) -> _[VecD](/python-api/docs/vecd#vecd)_

The Euler angles that rotate (0,0,-1) to be parallel with this vector.

**Returns** The Euler angles as a Vec of (heading, elevation, 0), in normalised coordinates.

#### **cross**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Computes the cross product of two vectors.

**Parameters**:

-   v: The other vector to compute the cross product with.

**Returns** The cross product of this vector and the given vector.

#### **dot**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _float_

Calculates the dot product of two vectors.

**Parameters**:

-   v: The other vector to calculate the dot product with.

**Returns** The dot product of this vector and the given vector.

#### **length**(self) -> _float_

The length of the vector in 3D space.

#### **normalise**(self) -> _[VecD](/python-api/docs/vecd#vecd)_

Returns a normalized version of the vector.

**Returns** A normalized version of the vector.

#### **round**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Rounds the components of a vector to the closest increment in each component of the given vector.

**Parameters**:

-   v: A vector representing the increment to round each component to.

**Returns** A new vector with the rounded components.

## Special Methods

#### **\_\_add\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Adds two vectors.

**Parameters**:

-   v: The VecD object to add to this one.

**Returns** The component-wise sum of this and the input vector.

#### **\_\_div\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Divides two vectors component-wise.

**Parameters**:

-   v: The other vector to divide by.

**Returns** The result of dividing this vector component-wise by the given vector.

#### **\_\_eq\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _bool_

Tests for equality between two vectors.

**Parameters**:

-   v: The vector to compare with.

**Returns** True if all components of the vectors are equal, false otherwise.

#### **\_\_mul\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Multiplies two vectors component-wise.

**Parameters**:

-   v: The other vector to multiply with.

**Returns** The component-wise product of this vector and the given vector.

#### **\_\_ne\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _bool_

Tests for inequality between two vectors.

**Parameters**:

-   v: The vector to compare with.

**Returns** True if any of the components of the vectors are not equal, false otherwise.

#### **\_\_sub\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Subtracts another vector from this vector.

**Parameters**:

-   v: The vector to subtract from this vector.

**Returns** The resulting vector after component-wise subtraction.

#### **\_\_truediv\_\_**(self, v: _[VecD](/python-api/docs/vecd#vecd) | [Vec2](/python-api/docs/vec2#vec2) | [Vec](/python-api/docs/vec#vec)_) -> _[VecD](/python-api/docs/vecd#vecd)_

Divides two vectors component-wise.

**Parameters**:

-   v: The other vector to divide by.

**Returns** The result of dividing this vector component-wise by the given vector.
