Skip to content

shz_vec2_magnitude

Markdown
SHZ_INLINE float shz_vec2_magnitude(shz_vec2_t vec) SHZ_NOEXCEPT;

Returns the magnitude of the given 2D vector.

NameTypeDescription
vecshz_vec2_tThe vector whose magnitude is returned.

The magnitude of vec.

Safely returns 0.0f when vec has a magnitude of 0.0f.

shz_vec2_magnitude_fsrra, shz_vec2_magnitude_sqr, shz_vec2_magnitude_inv