Commits

Barry Schwartz committed 3cdb88a

Make cyclic piecewise behave more consistently in its wrapping around.

  • Participants
  • Parent commits 9894b78

Comments (0)

Files changed (1)

File fontdesign/piecewise.pure

   length pwise::piecewise = #(parts pwise);
 
   point pwise@(Piecewise p::list cyclic::int) t
-  = point pwise (floatmod t (#p)) if cyclic && (t < 0 || #p < t);
+  = point pwise (floatmod t (#p)) if cyclic && (t < 0 || #p <= t);
   = point pwise 0 if ~cyclic && t < 0;
   = point pwise (#p) if ~cyclic && #p < t;
   = point (last p) 1.0 if t == #p;