Returns the square of the distance between two vectors.


func simd_distance_squared(_ __x: simd_double3, _ __y: simd_double3) -> Double

See Also

Geometry Functions

func simd_cross(simd_double3, simd_double3) -> simd_double3

Returns the cross product of two vectors.

func simd_dot(simd_double3, simd_double3) -> Double

Returns the dot product of two vectors.

func simd_normalize(simd_double3) -> simd_double3

Returns a vector pointing in the same direction of the supplied vector with a length of 1.

func simd_orient(simd_double3, simd_double3, simd_double3) -> Double

Tests the orientation of the three supplied vectors.

func simd_project(simd_double3, simd_double3) -> simd_double3

Returns the first vector projected onto the second vector.

func simd_precise_normalize(simd_double3) -> simd_double3

Returns the precise normalized vector.

func simd_length(simd_double3) -> Double

Returns the length of a vector.

func simd_length_squared(simd_double3) -> Double

Returns the square of the length of a vector.

func simd_norm_inf(simd_double3) -> Double

Returns the inf-norm (the maximum absolute value) of a vector.

func simd_norm_one(simd_double3) -> Double

Returns the one-norm (the sum of absolute values) of a vector.

func simd_refract(simd_double3, simd_double3, Double) -> simd_double3

Returns the refraction direction of an incident vector, a unit normal vector, and an index of refraction eta.

func simd_reflect(simd_double3, simd_double3) -> simd_double3

Returns the reflection direction of an incident vector and a unit normal vector.