- Random observation of the day!
No one really reads this, do they?
Anyways, I'm still working hard on my current project: CODENAME SKYNET!!!
I will now pull a Valve
Const e = 2.71828182845905
Public Function limiterFunc(weightedSum As Double, limiterFunction As Long) As Double
'this is the basic function that contains all the limiter
'functions. Put it in here to keep everything clutter-free.
Dim tmp As Double
Select Case limiterFunction
'default function - step function
'if it's less than 0, return 0
If weightedSum <= 0 Then
limiter = 0
'if its greater than 0, return 1
ElseIf weightedSum > 0 Then
limiter = 1
tmp = 1 / (1 + e ^ (-1 * weightedSum))
limiterFunc = tmp
'something weird going on
Debug.Print "Invalid limiter function used..."
Have a nice day!