]> granicus.if.org Git - graphviz/commitdiff
add comment about why wrong initializations is OK
authorellson <devnull@localhost>
Tue, 18 Oct 2005 18:59:11 +0000 (18:59 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 18:59:11 +0000 (18:59 +0000)
lib/common/geom.c

index e39cf6f33c3da45893d2e8d06f977d055000f98b..91d5d04fbcc7f70c1033b22d2dece0a41f091d21 100644 (file)
@@ -355,6 +355,8 @@ static pointf rotatepf(pointf p, int cwrot)
     static int last_cwrot;
     pointf P;
 
+    /* cosa is initially wrong for a cwrot of 0
+     * this caching only works because we are never called for 0 rotations */
     if (cwrot != last_cwrot) {
        sincos(cwrot / (2 * M_PI), &sina, &cosa);
        last_cwrot = cwrot;