shz_vec3_magnitude_inv_fsrra
SHZ_INLINE float shz_vec3_magnitude_inv_fsrra(shz_vec3_t vec) SHZ_NOEXCEPT;Returns the inverse magnitude of the given 3D vector, unsafely, using FSRRA.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
vec | shz_vec3_t | The vector whose inverse magnitude is returned. |
Returns
Section titled “Returns”1.0f divided by the magnitude of vec.
Details
Section titled “Details”Faster alternative to shz_vec3_magnitude_inv() which does not check for a zero-length vector.
Warnings
Section titled “Warnings”- Results in a division-by-zero when
vechas a magnitude of0.0f.
Naming and requirements
Section titled “Naming and requirements”_fsrra: UsesFSRRA(fast approximate 1/sqrt(x)). The argument or denominator must be positive. Faster, less precise. (Naming and Suffixes)
Availability
Section titled “Availability”- C++ equivalent:
shz::vec3::magnitude_inv_fsrra - Type-generic form:
shz_vec_magnitude_inv_fsrra() - Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_vector.h:612 - Module: Vector, section "Magnitude"