logo VB.Net - Advanced Trignometry
Guide Contents
DigitalDan Home Page

Advanced Trig - Lesser Known Functions
These examples provide functions for some lesser known Trignometry functions. Be aware that this page measures angles in Radians instead of degrees. Although many formulae requiring advanced trignometry require the use of radians, many calculators default to degrees
 
You will find functions to convert between degreea and radians on the "Trignoetery Sin, Cos, Tan" Page.
 
Private Shared Function Chord(angle As Double) As Double
Return 2 * Math.Sin(angle / 2)
End Function
'
'Public Shared Function Cosec(angle As Double) As Double
' Return 1 / Math.Sin(angle)
'End Function
''
'Public Shared Function Cot(angle As Double) As Double
' Return 1 / (Math.Tan(angle))
'End Function
'
Public Shared Function CoVerCosine(angle As Double) As Double
Return 1 + Math.Sin(angle)
End Function
'
Public Shared Function CoVerSine(angle As Double) As Double
Return 1 - Math.Sin(angle)
End Function
'
'Private Shared Function ExCsc(angle As Double) As Double
Return (1 / Math.Sin(angle)) - 1
End Function
'
Private Shared Function ExSec(angle As Double) As Double
Return (Math.Sqrt(1 + (Math.Tan(angle) ^ 2))) - 1
End Function
'
Public Shared Function Sec(angle As Double) As Double
Return 1 / Math.Cos(angle)
End Function
'
Public Shared Function Sinc(num As Double) As Double
If Math.Abs(num) < 0.000001 Then Return 1
' prevents overflow error caused by division by 0 ' laid logic because sinc(very_small_numeber) will approximate to 1
Return Math.Sin(num) / num
End Function
'
'Public Shared Function Tanc(num As Double) As Double
If Math.Abs(num) < 0.000001 Then Return 1
' prevents overflow error caused by division by 0
' laid logic because tanc(very_small_numeber) will approximate to 1
Return Math.Tan(num) / num
End Function
'
Public Shared Function VerCosine(angle As Double) As Double
Return 1 + Math.Cos(angle)
End Function
'
Public Shared Function VerSine(angle As Double) As Double
Return 1 - Math.Cos(angle)
End Function

DigitalDan.co.uk ... Hits = 133