diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pamtosvg/vector.c | 9 | ||||
-rw-r--r-- | converter/other/pamtosvg/vector.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/converter/other/pamtosvg/vector.c b/converter/other/pamtosvg/vector.c index 43e1872e..e25c1068 100644 --- a/converter/other/pamtosvg/vector.c +++ b/converter/other/pamtosvg/vector.c @@ -235,6 +235,15 @@ Psubtract(float_coord const c1, +vector_type +Pdirection(float_coord const final, + float_coord const initial) { + + return normalize(Psubtract(final, initial)); +} + + + /* Operations on integer points. */ vector_type diff --git a/converter/other/pamtosvg/vector.h b/converter/other/pamtosvg/vector.h index b3a5454e..b5c85c38 100644 --- a/converter/other/pamtosvg/vector.h +++ b/converter/other/pamtosvg/vector.h @@ -64,6 +64,10 @@ float_coord Vsubtract_point(float_coord const, vector_type const); +vector_type +Pdirection(float_coord const final, + float_coord const initial); + /* This returns the rounded sum. */ #define IPadd_vector Vadd_int_point |