Checking whether a point lies on a wide line segment I know how to define a point on the segment, but I have this piece is a wide interval. The line has a width.
I have $x_1$ $y_1$, $x_2$ $y_2$, width and $x_3$ $y_3$
$x_3$ and $x_4$ what you need to check.
perhaps someone can help, and function in $\Bbb{C}$ #

Please check "Line defined by two points" section of 
https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
From there, it is easy to derive the C# function:
double distOfLineDefinedBy2PointsAndPoint(double x1, double y1, double x2, double y2, double x3, double y3) {
        return Math.Abs((y2 - y1) * x3 - (x2 - x1) * y3 + x2 * y1 - y2 * x1) /
                Math.Sqrt(Math.Pow(y2 - y1, 2) + Math.Pow(x2 - x1, 2));
    }

Now, you can use the result of this function and compare it to half of the width.
