CURELab.SignLanguage.HandDetector.PointHelper.TanWith C# (CSharp) Method

TanWith() public static method

public static TanWith ( this p1, Point p2 ) : float
p1 this
p2 System.Drawing.Point
return float
        public static float TanWith(this Point p1, Point p2)
        {
            if (p1.X - p2.X == 0)
            {
                return float.MaxValue;
            }
            float result = (float)Math.Abs(p1.Y - p2.Y) / Math.Abs(p1.X - p2.X);
            return result;
        }