Commit graph

17 commits

Author SHA1 Message Date
6e2253948b dashing::Dash: provide constructor 2025-06-09 10:20:43 +02:00
acfd505b3d Fix incorrect dash patterns that start in gaps
I noticed some (incorrect dash patterns)[https://social.afront.org/deck/@stylus/114647763027177789]
this fixes them by correctly advancing during a skip, refactoring
the code slightly to make it easier to think about.
2025-06-08 18:02:21 +02:00
a55d21398a implement pythonmod closer to how python does it
I briefly suspected my implementation of pythonmod when debugging
an incorrect result. It was not the cause, but I might as well
make the structure of the function match current cpython.
2025-06-08 18:00:59 +02:00
f52035ead1 get rid of need for boost, but require c++20 2024-12-26 20:05:58 -06:00
987ff83c06
add openmp 2023-12-31 15:57:30 -06:00
e916865163
get rid of an unneeded conditional (we just asserted it) 2023-12-31 15:53:01 -06:00
4dc78ca136
Optimize
* Assume dash patterns are all on-off(-on-off...) even though this is
not necessarily true

 * now unroll the uvdraw loop 1 time so that there's no test of whether
   to draw or not, and half as many 'maybe reset i' checks
2023-12-31 15:52:50 -06:00
40c67baf3a
Switch data types from double to float (via a new typedef)
and get rid of a pessimizing std::move
2023-12-21 20:44:13 -06:00
Jeff Epler
386d98d587 additional point operators
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2017-06-02 16:12:58 -05:00
Jeff Epler
5167ba3dd7 simplify the way the value is returned
.. no need for named temporary Point

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2017-06-02 16:12:58 -05:00
Jeff Epler
b70d655489 Manually unroll first loop iteration, where o may be nonzero
.. simplifying subsequent iterations by not requiring them to account for o

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2017-06-02 16:12:57 -05:00
Jeff Epler
7adf8e24df Don't needlessly copy pattern.dash[i]
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2017-06-02 16:12:57 -05:00
Jeff Epler
0818899738 reserve space for segments 2016-01-27 20:44:34 -06:00
Jeff Epler
29530a3b6d avoid calling fabs 2015-11-06 13:48:24 -06:00
Jeff Epler
9d1843800d indices are integral types 2015-11-06 13:33:28 -06:00
Jeff Epler
6776ea122c avoid expensive modulo calculation 2015-11-06 13:25:08 -06:00
Jeff Epler
171c391b20 use a more typical extension for C++ header files 2015-11-02 11:35:07 -06:00
Renamed from dashing.h (Browse further)