private static double GetSlope(PointF point1, PointF point2)
{
    //slope is delta-y/delta-x
    double deltaX = (double)(point2.X - point1.X);
    double deltaY = (double)(point2.Y - point1.Y);

    return deltaY / deltaX;
}