Type Definition rust_examples::rsqrt::Vec3D[][src]

pub type Vec3D = (f32, f32, f32);
Expand description

Type alias for 3D vector represented as 3-tuple of f32

Trait Implementations

This implementation of FastNormalize uses a fast_rsqrt<1> to compute compute the invese square root of x^2 + y^2 + z^2 of the components of the initial vector.

Because the components must be converted to PositiveFloats, additional checks are necessary to validate the inputs. Moreover, because the validation might fail, the return type must be wrapped into an Option.

Normalization return type

Normalize this vector and return NormVec