Imports System
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports MetricFunctions

Namespace MetricFunctions

    'To sign this assembly, compile it from the command-line with vbc
    ' and uncomment the following line
    '<Assembly: AssemblyKeyFile("pubpriv.snk")> 

    Public Class TempFunctions
        ' Take two Fahrenheit temperatures and adds
        ' Can return the result as Fahrenheit and Centrigrade
        Public Shared Function AddTemp(ByVal x As Double, ByVal y As Double, ByVal convert As Boolean) As Double
            If convert = True Then
                Return MetricConverter.FahrenheitToCentigrade(x + y)
            Else
                Return x + y
            End If
        End Function

        ' Take two Fahrenheit temperatures and subtracts
        ' Can return the result as Fahrenheit and Centrigrade
        Public Shared Function SubtractTemp(ByVal x As Double, ByVal y As Double, ByVal convert As Boolean) As Double
            If convert = True Then
                Return MetricConverter.FahrenheitToCentigrade(x - y)
            Else
                Return x - y
            End If
        End Function
    End Class
End Namespace
