I develop in .NET an application that draws some lines.
In the middle of a line I need to draw the line direction array.
Have:
(xA, yA, xB, yB) or (pA, pB) – segment AB points
arrWidth, arrHeight – arrow dimensions;
> B – arrow direction.
Need:
3 new points pArr1, pArr2, pArr3 – points of the directional arrow, that should be situated in the middle of the segment AB.

First I’ll make some definitions.
let:
Then your three points are:
Where v/|v| is the unit vector along your line.
In 2 dimensions L is just the mapping (x, y) => (-y, x)
To be more explicit, using the variables in the question, the points above could be written in C# as: