At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.
Become a Premium Member and unlock a new, free course in leading technologies each month.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Function getValue(L As Double) As Double
If L >= 0 And L <= 5 Then
getValue = 0
ElseIf L >= 10 And L <= 20 Then
getValue = 0.15
ElseIf L >= 21 And L <= 40 Then
getValue = 0.3
ElseIf L >= 41 And L <= 60 Then
getValue = 0.5
ElseIf L >= 61 And L <= 80 Then
getValue = 0.7
ElseIf L < 0 And L >= -9 Then
getValue = 0
ElseIf L < -10 And L >= -20 Then
getValue = -0.15
ElseIf L < -21 And L >= -40 Then
getValue = -0.3
ElseIf L < -41 And L >= -60 Then
getValue = -0.5
ElseIf L < -61 And L >= -80 Then
getValue = -0.7
ElseIf L < -81 And L >= -99 Then
getValue = -0.8
Else
getValue = 0
End If
End Function
Function getValue(L As Double) As Double
If L >= 0 And L <= 0.05 Then
getValue = 0
ElseIf L >= 0.1 And L <= 0.2 Then
getValue = 0.15
ElseIf L >= 0.21 And L <= 0.4 Then
getValue = 0.3
ElseIf L >= 0.41 And L <= 0.6 Then
getValue = 0.5
ElseIf L >= 0.61 And L <= 0.8 Then
getValue = 0.7
ElseIf L < 0 And L >= -0.09 Then
getValue = 0
ElseIf L < -0.1 And L >= -0.2 Then
getValue = -0.15
ElseIf L < -0.21 And L >= -0.4 Then
getValue = -0.3
ElseIf L < -0.41 And L >= -0.6 Then
getValue = -0.5
ElseIf L < -0.61 And L >= -0.8 Then
getValue = -0.7
ElseIf L < -0.81 And L >= -0.99 Then
getValue = -0.8
Else
getValue = 0
End If
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.