Vector3
Last updated
Last updated
Function | Description |
---|---|
new(X: number, Y: number, Z: number) -> Vector3
Creates a new Vector3
object with the specified X, Y, and Z coordinates and returns it. Requires three arguments.
split(Vector3: Vector3) -> X: number, Y: number, Z: number
Splits a Vector3
object into its X, Y, and Z components and returns them as separate outputs.
magnitude(Point1: Vector3, Point2: Vector3) -> Distance: number
Calculates the distance between two points represented by Vector3
objects and returns the distance as a number.
rotation(Point1: Vector3, Point2: Vector3) -> RotationVector3: Vector3
Calculates the rotation vector between two Vector3
points and returns it as a new Vector3
.
normalize(Vector3: Vector3) -> Result: Vector3
Normalizes the given Vector3
and returns the normalized result as a new Vector3
.
dot(VectorA: Vector3, VectorB: Vector3) -> Result: number
Computes the dot product of two Vector3
objects and returns the result as a number.
cross(VectorA: Vector3, VectorB: Vector3) -> Result: Vector3
Computes the cross product of two Vector3
objects and returns the result as a new Vector3
.