shz_vec2_magnitude
SHZ_INLINE float shz_vec2_magnitude(shz_vec2_t vec) SHZ_NOEXCEPT;Returns the magnitude of the given 2D vector.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
vec | shz_vec2_t | The vector whose magnitude is returned. |
Returns
Section titled “Returns”The magnitude of vec.
Details
Section titled “Details”Safely returns 0.0f when vec has a magnitude of 0.0f.
Availability
Section titled “Availability”- C++ equivalent:
shz::vec2::magnitude - Type-generic form:
shz_vec_magnitude() - Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_vector.h:487 - Module: Vector, section "Magnitude"
See also
Section titled “See also”shz_vec2_magnitude_fsrra, shz_vec2_magnitude_sqr, shz_vec2_magnitude_inv