Option Strict Off
Option Explicit On
Module ModConvert
    Public Const InToMeter As Double = 0.0254
    Public Const PI As Double = 3.14159265359
    Public Const gTol As Double = 0.0002 'Tolerance used to determine if there is a match in the table. (Inches)

    '********************************************************
    '******      Unit Conversion Functions        ***********
    '********************************************************
    'Returns a number converted from inches to meters
    Public Function ItoM(ByRef InchValue As Double) As Double
        ItoM = InchValue * InToMeter
    End Function

    'Returns a number converted from meters to inches
    Public Function MtoI(ByRef MeterValue As Double) As Double
        MtoI = MeterValue / InToMeter
    End Function

    'Returns a number converted from degrees to radians
    Public Function DtoR(ByRef DegreeValue As Double) As Double
        DtoR = PI * DegreeValue / 180
    End Function

    'Returns a number converted from radians to degrees
    Public Function RtoD(ByRef RadianValue As Double) As Double
        RtoD = 180 * RadianValue / PI
    End Function
End Module