cross method

Vector3 cross(
  1. Vector3 other
)

Compute the cross product of two vectors

Implementation

Vector3 cross(Vector3 other) {
  return Vector3(
    y * other.z - z * other.y,
    z * other.x - x * other.z,
    x * other.y - y * other.x,
  );
}