Qahirah: Approximately-Equal Vectors, Matrcies & Rectangles

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
I’ve felt for a while that it would be useful for Qahirah
<https://github.com/ldo/qahirah>, my high-level Python binding for
Cairo, to have “approximately-equal” comparisons for Vector, Matrix and
Rect objects.

One of the new features in Python 3.5 is the math.isclose
<https://docs.python.org/3/library/math.html#math.isclose> function,
which provides exactly such a comparison for real numbers.

So I have built on this to add “iscloseto” methods to those Qahirah
objects, with the same options for specifying both relative and
absolute tolerances for the comparisons.
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.