GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AL_CHECK_INVERSE (3)

NAME

al_check_inverse - Allegro 5 API

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

C]
#include <allegro5/allegro.h>

int al_check_inverse(const ALLEGRO_TRANSFORM *trans, float tol) ]

DESCRIPTION

Checks if the transformation has an inverse using the supplied tolerance. Tolerance should be a small value between 0 and 1, with 1e-7 being sufficient for most applications.

In this function tolerance specifies how close the determinant can be to 0 (if the determinant is 0, the transformation has no inverse). Thus the smaller the tolerance you specify, the "worse" transformations will pass this test. Using a tolerance of 1e-7 will catch errors greater than 1/1000[aq]s of a pixel, but let smaller errors pass. That means that if you transformed a point by a transformation and then transformed it again by the inverse transformation that passed this check, the resultant point should less than 1/1000[aq]s of a pixel away from the original point.

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 or you have a really large translation. As long as the scale is comfortably above 0, the transformation will be invertible.

I]Parameters:]
[bu] trans - Transformation to check
[bu] tol - Tolerance
I]Returns:] 1 if the transformation is invertible, 0 otherwise

SEE ALSO

al_invert_transform(3)

Search for    or go to Top of page |  Section 3 |  Main Index


Allegro reference manual AL_CHECK_INVERSE (3)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.