# Vector3

Artifact: [androidx.xr.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/xr-runtime) [View Source](https://cs.android.com/search?q=file:androidx/xr/runtime/math/Vector3.kt+class:androidx.xr.runtime.math.Vector3) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

*** ** * ** ***


```
public final class Vector3
```

<br />

*** ** * ** ***

Three-dimensional position in space.

The coordinate system is right-handed. The `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#x()`-axis points to the right, the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#y()`-axis up and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#z()`-axis back.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Backward()` Vector with z set to one and all other components set to zero. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Down()` Vector with y set to negative one and all other components set to zero. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Forward()` Vector with z set to negative one and all other components set to zero. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Left()` Vector with x set to negative one and all other components set to zero. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#One()` Vector with all components set to one. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Right()` Vector with x set to one and all other components set to zero. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Up()` Vector with y set to one and all other components set to zero. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Zero()` Vector with all components set to zero. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Vector3(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 other)` Creates a new vector with the same values as the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#(androidx.xr.runtime.math.Vector3)` vector. |
| `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Vector3(kotlin.Float,kotlin.Float,kotlin.Float)(float x, float y, float z)` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#abs(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector)` Returns the absolute values of each component of the vector. |
| `static final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#angleBetween(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector1, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector2)` Returns the angle between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#angleBetween(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#angleBetween(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` in degrees. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#clamp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 min, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 max)` Returns a new vector with its values clamped between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#clamp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#clamp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` vectors. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#copy(kotlin.Float,kotlin.Float,kotlin.Float)(float x, float y, float z)` Returns a copy of the vector. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#cross(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 other)` Returns the cross product of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#cross(androidx.xr.runtime.math.Vector3)` vector. |
| `static final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#distance(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector1, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector2)` Returns the distance between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#distance(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#distance(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#div(kotlin.Float)(float c)` Returns a new vector with this vector divided by a scalar amount. |
| `final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#dot(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 other)` Returns the dot product of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#dot(androidx.xr.runtime.math.Vector3)` vector. |
| `boolean` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` Returns true if this vector is equal to `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#equals(kotlin.Any)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#fromValue(kotlin.Float)(float value)` Creates a new vector with all components set to `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#fromValue(kotlin.Float)`. |
| `final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#getLength()()` The length of the vector. |
| `final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#getLengthSquared()()` The squared length of the vector. |
| `final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#getX()()` the value of the horizontal component |
| `final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#getY()()` the value of the vertical component |
| `final float` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#getZ()()` the value of the forward component |
| `int` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#hashCode()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#inverse()()` Returns the component-wise multiplicative inverse of this vector. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 start, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 end, float ratio)` Returns a new vector linearly interpolated between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)` by `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#max(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 a, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 b)` Returns the maximum of each component of the two vectors. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#min(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 a, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 b)` Returns the minimum of each component of the two vectors. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#minus(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 other)` Returns a new vector with the difference of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#minus(androidx.xr.runtime.math.Vector3)` vector. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#plus(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 other)` Returns a new vector with the sum of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#plus(androidx.xr.runtime.math.Vector3)` vector. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#projectOnPlane(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 planeNormal)` Computes the vector projected from `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#projectOnPlane(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` onto `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#projectOnPlane(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#scale(androidx.xr.runtime.math.Vector3)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 other)` Returns a new vector by component-wise multiplying this vector by `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#scale(androidx.xr.runtime.math.Vector3)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#times(kotlin.Float)(float c)` Get a new vector multiplied by a scalar amount. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#toNormalized()()` Returns the normalized version of this vector. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#toString()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#unaryMinus()()` Negates this vector. |

## Public fields

### Backward

```
public static final @NonNull Vector3 Backward
```

Vector with z set to one and all other components set to zero.

### Down

```
public static final @NonNull Vector3 Down
```

Vector with y set to negative one and all other components set to zero.

### Forward

```
public static final @NonNull Vector3 Forward
```

Vector with z set to negative one and all other components set to zero.

### Left

```
public static final @NonNull Vector3 Left
```

Vector with x set to negative one and all other components set to zero.

### One

```
public static final @NonNull Vector3 One
```

Vector with all components set to one.

### Right

```
public static final @NonNull Vector3 Right
```

Vector with x set to one and all other components set to zero.

### Up

```
public static final @NonNull Vector3 Up
```

Vector with y set to one and all other components set to zero.

### Zero

```
public static final @NonNull Vector3 Zero
```

Vector with all components set to zero.

## Public constructors

### Vector3

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public Vector3(@NonNull Vector3 other)
```

Creates a new vector with the same values as the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#(androidx.xr.runtime.math.Vector3)` vector.

### Vector3

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public Vector3(float x, float y, float z)
```

## Public methods

### abs

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final @NonNull Vector3 abs(@NonNull Vector3 vector)
```

Returns the absolute values of each component of the vector.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector` | the vector to get the absolute values of |

### angleBetween

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final float angleBetween(@NonNull Vector3 vector1, @NonNull Vector3 vector2)
```

Returns the angle between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#angleBetween(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#angleBetween(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` in degrees. The result is never greater than 180 degrees.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector1` | the first vector |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector2` | the second vector |

### clamp

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 clamp(@NonNull Vector3 min, @NonNull Vector3 max)
```

Returns a new vector with its values clamped between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#clamp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#clamp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` vectors.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 min` | the minimum clamp values |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 max` | the maximum clamp values |

### copy

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 copy(float x, float y, float z)
```

Returns a copy of the vector.

| Parameters |
|---|---|
| `float x` | the new x value for the copied vector |
| `float y` | the new y value for the copied vector |
| `float z` | the new z value for the copied vector |

### cross

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 cross(@NonNull Vector3 other)
```

Returns the cross product of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#cross(androidx.xr.runtime.math.Vector3)` vector.

### distance

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final float distance(@NonNull Vector3 vector1, @NonNull Vector3 vector2)
```

Returns the distance between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#distance(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#distance(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector1` | the first vector |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector2` | the second vector |

### div

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 div(float c)
```

Returns a new vector with this vector divided by a scalar amount.

| Parameters |
|---|---|
| `float c` | the scalar to divide by |

### dot

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final float dot(@NonNull Vector3 other)
```

Returns the dot product of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#dot(androidx.xr.runtime.math.Vector3)` vector.

### equals

```
public boolean equals(Object other)
```

Returns true if this vector is equal to `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#equals(kotlin.Any)`.

### fromValue

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final @NonNull Vector3 fromValue(float value)
```

Creates a new vector with all components set to `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#fromValue(kotlin.Float)`.

### getLength

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final float getLength()
```

The length of the vector.

### getLengthSquared

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final float getLengthSquared()
```

The squared length of the vector.

### getX

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final float getX()
```

the value of the horizontal component

### getY

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final float getY()
```

the value of the vertical component

### getZ

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final float getZ()
```

the value of the forward component

### hashCode

```
public int hashCode()
```

### inverse

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 inverse()
```

Returns the component-wise multiplicative inverse of this vector.

### lerp

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final @NonNull Vector3 lerp(@NonNull Vector3 start, @NonNull Vector3 end, float ratio)
```

Returns a new vector linearly interpolated between `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)` and `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)` by `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)`.

If `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#lerp(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)` is outside of the range `[0, 1]`, the returned vector will be extrapolated.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 start` | the starting vector |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 end` | the ending vector |
| `float ratio` | the interpolation ratio |

### max

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final @NonNull Vector3 max(@NonNull Vector3 a, @NonNull Vector3 b)
```

Returns the maximum of each component of the two vectors.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 a` | the first vector |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 b` | the second vector |

### min

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final @NonNull Vector3 min(@NonNull Vector3 a, @NonNull Vector3 b)
```

Returns the minimum of each component of the two vectors.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 a` | the first vector |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 b` | the second vector |

### minus

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 minus(@NonNull Vector3 other)
```

Returns a new vector with the difference of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#minus(androidx.xr.runtime.math.Vector3)` vector.

### plus

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 plus(@NonNull Vector3 other)
```

Returns a new vector with the sum of this vector and the `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#plus(androidx.xr.runtime.math.Vector3)` vector.

### projectOnPlane

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public static final @NonNull Vector3 projectOnPlane(@NonNull Vector3 vector, @NonNull Vector3 planeNormal)
```

Computes the vector projected from `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#projectOnPlane(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)` onto `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3.Companion#projectOnPlane(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 vector` | the vector to project |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 planeNormal` | the normal of the plane to project onto |

### scale

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 scale(@NonNull Vector3 other)
```

Returns a new vector by component-wise multiplying this vector by `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#scale(androidx.xr.runtime.math.Vector3)`.

### times

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 times(float c)
```

Get a new vector multiplied by a scalar amount.

| Parameters |
|---|---|
| `float c` | the scalar to multiply by |

### toNormalized

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 toNormalized()
```

Returns the normalized version of this vector. A zero-length vector has no direction to normalize and returns `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3#Zero()` rather than a vector of NaN components.

### toString

```
public @NonNull String toString()
```

### unaryMinus

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0-beta02)

```
public final @NonNull Vector3 unaryMinus()
```

Negates this vector.