cross2 method
Vector3
cross2(
- Vector3 vector, [
- Vector3? target
Vector cross product @param target Optional target to save in.
Implementation
Vector3 cross2(Vector3 vector, [Vector3? target]){
target ??= Vector3.zero();
final vx = vector.x;
final vy = vector.y;
final vz = vector.z;
target.x = y * vz - z * vy;
target.y = z * vx - x * vz;
target.z = x * vy - y * vx;
return target;
}