Private Function GetAngularCoefficient(ByVal segment As PointF()) As Single
If segment.Length <> 2 Then Throw New ArgumentException("Parameter must be of 2 items", "segment")
Dim U As PointF = segment(0)
Dim V As PointF = segment(1)
Dim angle As Double = GetAngularCoefficientRads(U, V)
If angle Mod Math.PI = Math.PI / 2D Then Return Single.PositiveInfinity
If angle Mod Math.PI = -Math.PI / 2D Then Return Single.NegativeInfinity
Return CSng(Math.Tan(angle))
End Function
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
Need help parsing JSON in my VB.Net application | 4 | 41 | |
Is anyone willing to have a look through this code and help debug? | 25 | 56 | |
Spacing between controls | 4 | 29 | |
how to use laptop or pad camera in vb.net windows application | 2 | 45 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
10 Experts available now in Live!