X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flibnr%2Fnr-matrix-fns.h;h=a46aca9095900fadf04c6416e88d5aecd4c67615;hb=3955580a5a68a873b098921626f5b9d841b964ec;hp=20836674669d8aa50a6d929d2a2b5698a5196f1d;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/libnr/nr-matrix-fns.h b/src/libnr/nr-matrix-fns.h index 208366746..a46aca909 100644 --- a/src/libnr/nr-matrix-fns.h +++ b/src/libnr/nr-matrix-fns.h @@ -2,6 +2,7 @@ #define SEEN_NR_MATRIX_FNS_H #include "nr-matrix.h" +#include namespace NR { @@ -24,6 +25,8 @@ Matrix from_basis(const Point x_basis, const Point y_basis, const Point offset=P Matrix identity(); double expansion(Matrix const &m); +inline double expansionX(Matrix const &m) { return hypot(m[0], m[1]); } +inline double expansionY(Matrix const &m) { return hypot(m[2], m[3]); } bool transform_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon); bool translate_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon);