al_check_inverse

int al_check_inverse(const ALLEGRO_TRANSFORM *trans, float tol)
Introduced in 5.0.0

Checks if the transformation has an inverse using the supplied tolerance. Tolerance should be a small value between 0 and 1, with 0.001 being sufficient for most applications. Note that this check is superfluous most of the time if you never touched the transformation matrix values yourself. The only thing that would cause the transformation to not have an inverse is if you applied a 0 (or very small) scale to the transformation. As long as the scale is comfortably above 0, the transformation will be invertible.

Parameters:

Returns: 1 if the transformation is invertible, 0 otherwise

See also: al_invert_transform


Most helpful discussions: