# VectorSignal

### Properties

PropertyDescription

`x`

```(get) x: ScalarSignal (set) (Not Available)```

Represents the X component of the vector.

`y`

```(get) y: ScalarSignal (set) (Not Available)```

Represents the Y component of the vector.

`z`

```(get) z: ScalarSignal (set) (Not Available)```

Represents the Z component of the vector.

### Methods

MethodDescription

`add`

```add(other: VectorSignal): VectorSignal add(other: PointSignal): PointSignal```

Returns a signal with the value that is the sum of the values of the given signals.

Note: `add` and `sum` functions are synonims, the behavior they provide is equivalent.

See Also: `VectorSignal.sum`, `ReactiveModule.add`

`cross`

`cross(other: VectorSignal): VectorSignal`

Returns a vector signal with the value that is the cross product of the given signals.

See Also: `VectorSignal.dot`, `ScalarSignal.mul`, `VectorSignal.mul`

`delayBy`

`delayBy({milliseconds: number}): VectorSignal`

Delays a vector signal. The argument is an object with a "milliseconds" property specifying the delay duration in milliseconds.

`dot`

`dot(other: VectorSignal): ScalarSignal`

Returns a scalar signal with the value that is the dot product of the given signals.

See Also: `VectorSignal.cross`, `ScalarSignal.mul`, `VectorSignal.mul`

`expSmooth`

`expSmooth(dampFactor: number): VectorSignal`

Smoothes a variable signal using exponential averaging over time. The argument specifies the dampening time constant in milliseconds.

Note: See also `ReactiveModule.expSmooth`.

`magnitude`

`magnitude(): ScalarSignal`

Returns the magnitude of the vector as a `ScalarSignal`.

`mul`

`mul(other: ScalarSignal): VectorSignal`

Returns a signal with the value that is the product of the values of the given signals.

See Also: `ReactiveModule.mul`, `ScalarSignal.mul`

`neg`

`neg(): VectorSignal`

Returns a signal with the negated value of the given signal.

See Also: `ReactiveModule.neg`, `ScalarSignal.neg`

`sub`

`sub(other: VectorSignal): VectorSignal`

Returns a signal with the value that is the difference of the values of the given signals.

See Also: `ReactiveModule.sub`, `PointSignal.sub`, `ScalarSignal.sub`

`sum`

```sum(other: VectorSignal): VectorSignal sum(other: PointSignal): PointSignal```

Returns a signal with the value that is the sum of the values of the given signals.

Note: `add` and `sum` functions are synonims, the behavior they provide is equivalent.

See Also: `VectorSignal.add`, `ReactiveModule.sum`