trfm.c
------

History
-------
26th October 1992  J R C  Started

   Provides functions useful for transformation-handling code. Since the
homogeneous parts of a transformation are held in 16-bit fixed point format,
all calculations are done internally to 64-bit precision, then truncated
down to 32 bits again. This is done using |muldiv| (muldiv (a, b, c) is
a*b/c).

   |Trfm_mul| multiplies two transformations together.

   |Trfm_point| applies a transformation to a point.

   |Trfm_dir| applies a transformation to a direction: it is the same as
|trfm_point|, except that it ignores the affine (translation) part of the
transformation.

   |Trfm_inv| inverts a transformation. If it is given a singular matrix, it
just divides by 0; the user is expected to have checked this.

   |Trfm_det| returns the determinant of a matrix, to allow |trfm_inv| to be
used in a secure fashion.

   |Trfm_box| applies a transformation to a box and rebounds the result.
