Skip to main content

sq_distance

Function sq_distance 

Source
pub fn sq_distance<T>(a: &Vector3<T>, b: &Vector3<T>) -> T
where T: Float + Scalar + ComplexField<RealField = T>,
Expand description

Calculate the square of the Euclidean distance between two points.

Note: points do NOT need to be valid Points. @post for unit vectors: result <= 4

  • a, b the points.

returns the square of the Euclidean distance between the points.