Logo Search packages:      
Sourcecode: inkscape version File versions

rotate NR::rotate::inverse (  )  const [inline]

Todo:
In the usual case that vec is a unit vector (within rounding error), dividing by len_sq is either a noop or numerically harmful. Make a unit_rotate class (or the like) that knows its length is 1.

Definition at line 40 of file nr-rotate.h.

Referenced by rotate_degrees().

                           {
        /** \todo
         * In the usual case that vec is a unit vector (within rounding error),
         * dividing by len_sq is either a noop or numerically harmful. 
         * Make a unit_rotate class (or the like) that knows its length is 1.
         */
        double const len_sq = dot(vec, vec);
        return rotate( Point(vec[X], -vec[Y])
                       / len_sq );
    }


Generated by  Doxygen 1.6.0   Back to index