Skip to content

shz_vec2_cross

Markdown
SHZ_INLINE float shz_vec2_cross(shz_vec2_t vec1, shz_vec2_t vec2) SHZ_NOEXCEPT;

Returns the cross product, as a scalar, between two 2D vectors.

NameTypeDescription
vec1shz_vec2_t
vec2shz_vec2_t

float

  • The definition of the cross-product is ambiguous in 2D space, but the geometric interpretation here is that the result is the magnitude of the orthogonal vector created from the given two along the Z-axis.