al_check_inverse man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

al_check_inverse(3)					   al_check_inverse(3)

NAME
       al_check_inverse - Allegro 5 API

SYNOPSIS
	      #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 toler‐
       ance.  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'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'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.

       Parameters:

       · trans - Transformation to check

       · tol - Tolerance

       Returns: 1 if the transformation is invertible, 0 otherwise

SEE ALSO
       al_invert_transform(3)

Allegro reference manual				   al_check_inverse(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net