Table of Contents

Method TryGetInverse

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

TryGetInverse(out GeoTransform2)

Tries to get the transformation that undoes this one, using the default tolerance.

public bool TryGetInverse(out GeoTransform2 inverse)

Parameters

inverse GeoTransform2

The inverse, or the identity when the method returns false.

Returns

bool

true if the transformation can be undone; otherwise, false.

TryGetInverse(out GeoTransform2, Tolerance)

Tries to get the transformation that undoes this one, within a tolerance.

public bool TryGetInverse(out GeoTransform2 inverse, Tolerance tolerance)

Parameters

inverse GeoTransform2

The inverse, or the identity when the method returns false.

tolerance Tolerance

The tolerance the determinant is judged against, relative to the size of the transformation.

Returns

bool

true if the transformation can be undone; otherwise, false.

Remarks

The determinant is judged against the size of the transformation rather than against zero: two axes of unit length turned almost onto each other give a determinant near zero, and inverting that yields numbers so large they mean nothing. Scaling both axes by a thousandth gives a determinant just as small while being perfectly invertible, which is why the test is relative.