Are any of you good with maths? Just for fun, I wanted to make a function that accelerates and breaks a span of values according to a normally distributed bell curve.
Public Sub Go_Click()
Dim h As Float[]
Dim f As Float
h = BellCurve(0.0, 1, 0.01)
For Each f In h
Print f
Next
End
Public Sub BellCurve(Val1 As Float, Val2 As Float, Dist As Float) As Float[]
Dim i, y As Float
Dim fValues As New Float[]
For i = Val1 To Val2 Step Dist
y = (1 / Sqr(2 * Pi)) * (Exp((- Exp2(i)) / 2))
fValues.Add(y)
Next
Return fValues
End
I think I made the formula according to the picture, but the values given does not make sense.Code: Select all
0,24197072451914
0,24113066638911
0,24028771212673
0,23944187227953
0,23859315771476
0,23774157962215
0,23688714951667
0,23602987924122
0,23516978096936
0,23430686720801
0,23344115080014
0,23257264492739
0,23170136311274
0,23082731922316
0,22995052747215
0,22907100242238
0,22818875898819
0,22730381243817
0,22641617839766
0,22552587285122
0,22463291214508
0,22373731298958
0,22283909246157
0,22193826800677
0,22103485744211
0,220128878958
0,21922035112066
0,21830929287431
0,21739572354336
0,2164796628346
0,21556113083929
0,21464014803524
0,21371673528889
0,21279091385723
0,21186270538981
0,21093213193062
0,20999921591996
0,20906398019621
0,20812644799763
0,20718664296407
0,20624458913857
0,20530031096903
0,20435383330971
0,20340518142271
0,20245438097945
0,201501458062
0,20054643916439
0,19958935119386
0,19863022147206
0,19766907773612
0,19670594813977
0,19574086125423
0,19477384606918
0,1938049319936
0,19283414885647
0,19186152690755
0,19088709681789
0,18991088968045
0,18893293701048
0,18795327074596
0,18697192324783
0,18598892730022
0,18500431611055
0,18401812330958
0,18303038295134
0,18204112951297
0,18105039789446
0,18005822341836
0,17906464182929
0,17806968929343
0,17707340239787
0,17607581814992
0,17507697397621
0,17407690772178
0,17307565764904
0,1720732624366
0,17106976117802
0,1700651933804
0,16905959896292
0,16805301825526
0,16704549199583
0,16603706132997
0,16502776780798
0,16401765338308
0,16300676040915
0,1619951316385
0,16098281021934
0,15996983969327
0,15895626399256
0,15794212743733
0,15692747473258
0,15591235096512
0,15489680160036
0,1538808724789
0,15286460981311
0,15184806018344
0,15083127053468
0,14981428817206
0,14879716075719
0,14777993630387