Options
All
• Public
• Public/Protected
• All

# Class LinearVelocity

## Properties

accuracy: number

isVector3: true

### timestamp

timestamp: number

x: number

y: number

z: number

## Methods

### add

• Adds v to this vector.

### addVectors

• Sets this vector to a + b.

### angleTo

• angleTo(v: Vector3): number

### copy

• Copies value of v to this vector.

### cross

• Sets this vector to cross product of itself and v.

### crossVectors

• Sets this vector to cross product of a and b.

### distanceTo

• distanceTo(v: Vector3): number
• Computes distance of this vector to v.

### distanceToManhattan

• distanceToManhattan(v: Vector3): number
• deprecated

Use {@link Vector3#manhattanDistanceTo .manhattanDistanceTo()} instead.

### distanceToSquared

• distanceToSquared(v: Vector3): number
• Computes squared distance of this vector to v.

### divideScalar

• Divides this vector by scalar s. Set vector to ( 0, 0, 0 ) if s == 0.

### dot

• dot(v: Vector3): number
• Computes dot product of this vector and v.

### equals

• equals(v: Vector3): boolean
• Checks for strict equality of this vector and v.

### fromArray

• fromArray(array: number[] | ArrayLike<number>, offset?: number): LinearVelocity
• Sets this vector's x, y and z value from the provided array or array-like.

#### Parameters

• ##### array: number[] | ArrayLike<number>

the source array or array-like.

• ##### Optional offset: number

(optional) offset into the array. Default is 0.

### fromBufferAttribute

• fromBufferAttribute(attribute: BufferAttribute | InterleavedBufferAttribute, index: number): LinearVelocity

### getComponent

• getComponent(index: number): number

### length

• length(): number
• Computes length of this vector.

### lengthManhattan

• lengthManhattan(): number

### lengthSq

• lengthSq(): number
• Computes squared length of this vector.

### lerpVectors

• lerpVectors(v1: Vector3, v2: Vector3, alpha: number): LinearVelocity

### manhattanDistanceTo

• manhattanDistanceTo(v: Vector3): number
• Computes the Manhattan length (distance) from this vector to the given vector v

### manhattanLength

• manhattanLength(): number
• Computes the Manhattan length of this vector.

### multiplyScalar

• Multiplies this vector by scalar s.

### negate

• Inverts this vector.

### normalize

• Normalizes this vector.

### random

• Sets this vector's x, y and z from Math.random

### set

• Sets value of this vector.

### setFromCylindricalCoords

• setFromCylindricalCoords(radius: number, theta: number, y: number): LinearVelocity

### setFromMatrix3Column

• setFromMatrix3Column(matrix: Matrix3, index: number): LinearVelocity

### setFromSphericalCoords

• setFromSphericalCoords(r: number, phi: number, theta: number): LinearVelocity

### setLength

• Normalizes this vector and multiplies it by l.

### setScalar

• Sets all values of this vector.

### setX

• setX(x: number): Vector3
• Sets x value of this vector.

### setY

• setY(y: number): Vector3
• Sets y value of this vector.

### setZ

• setZ(z: number): Vector3
• Sets z value of this vector.

### sub

• Subtracts v from this vector.

### subVectors

• Sets this vector to a - b.

### toArray

• toArray(array?: number[], offset?: number): number[]
• toArray(array?: Vector3Tuple, offset?: 0): Vector3Tuple
• toArray(array: ArrayLike<number>, offset?: number): ArrayLike<number>
• Returns an array [x, y, z], or copies x, y and z into the provided array.

#### Parameters

• ##### Optional array: number[]

(optional) array to store the vector to. If this is not provided, a new array will be created.

• ##### Optional offset: number

(optional) optional offset into the array.

#### Returns number[]

The created or provided array.

#### Returns Vector3Tuple

• Copies x, y and z into the provided array-like.

#### Parameters

• ##### array: ArrayLike<number>

array-like to store the vector to.

• ##### Optional offset: number

(optional) optional offset into the array-like.

#### Returns ArrayLike<number>

The provided array-like.