pub fn cross(v1: &Vec3, v2: &Vec3) -> Vec3 {
    Vec3(
        v1.1 * v2.2 - v1.2 * v2.1,
        v1.2 * v2.0 - v1.0 * v2.2,
        v1.0 * v2.1 - v1.1 * v2.0,
    )
}
/// Compute the cross product between two vectors.
///
/// ```
/// # use raytracer::vec3::Vec3;
/// # use raytracer::vec3::cross;
/// let unit_x = Vec3(1., 0., 0.);
/// let unit_y = Vec3(0., 1., 0.);
/// let unit_z = Vec3(0., 0., 1.);
/// let cross_product = cross(&unit_x, &unit_y);
/// assert_eq!(cross_product.x(), 0.);
/// assert_eq!(cross_product.y(), 0.);
/// assert_eq!(cross_product.z(), 1.);
/// let cross_product = cross(&unit_x, &unit_z);
/// assert_eq!(cross_product.x(), 0.);
/// assert_eq!(cross_product.y(), -1.);
/// assert_eq!(cross_product.z(), 0.);
/// let cross_product = cross(&unit_y, &unit_z);
/// assert_eq!(cross_product.x(), 1.);
/// assert_eq!(cross_product.y(), 0.);
/// assert_eq!(cross_product.z(), 0.);
/// ```
Compute the cross product between two vectors.
Compute the cross product between two vectors .
pub fn cross(v1: &Vec3, v2: &Vec3) -> Vec3 {
    Vec3(
        v1.1 * v2.2 - v1.2 * v2.1,
        v1.2 * v2.0 - v1.0 * v2.2,
        v1.0 * v2.1 - v1.1 * v2.0,
    )
}
pub fn cross ( v1 : & Vec3 , v2 : & Vec3 ) -> Vec3 { Vec3 ( v1 . 1 * v2 . 2 - v1 . 2 * v2 . 1 , v1 . 2 * v2 . 0 - v1 . 0 * v2 . 2 , v1 . 0 * v2 . 1 - v1 . 1 * v2 . 0 , ) }
Compute the cross product between two vectors.
Compute the cross product between two vectors .
v1
&Vec3
v2
&Vec3
use raytracer::vec3::vec3;
None
use raytracer::vec3::cross;
None