cross method

Vector3 cross(
  1. Vector3 v
)

Computes the cross product of this and the given 3D vector and stores the result in this 3D vector.

Implementation

Vector3 cross(Vector3 v ) {
	final x = this.x, y = this.y, z = this.z;

	this.x = ( y * v.z ) - ( z * v.y );
	this.y = ( z * v.x ) - ( x * v.z );
	this.z = ( x * v.y ) - ( y * v.x );

	return this;
}