EvolvingNatFloat: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 3: Line 3:
Each sequential value is retrieved according to the first value and the sequence number.  
Each sequential value is retrieved according to the first value and the sequence number.  


To use EvolvingNatFloat, add the using statement for '''Vintagestory.API.MathTools'''.
To use EvolvingNatFloat, add the using statement for '''Vintagestory.API.MathTools'''.<br><br>


'''''Important note''': The value of sequence should always satisfy '''sequence < 0'''''
== Example in code ==
== Example in code ==
<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
Line 88: Line 89:
For every other function, the '''initialValue = 0'''<br>
For every other function, the '''initialValue = 0'''<br>


[[File:Annotatedclampedpositivesinus.png|150px]]
[[File:Txtpositiveclampedsinus.png|150px]]
[[File:Annotatedcosinus.png|150px]]
[[File:Txtcosinus.png|150px]]
[[File:Annotatedidentical.png|150px]]
[[File:Txtidentical.png|150px]]
[[File:Annotatedinverselinear.png|150px]]<br><br>
[[File:Txtinverselinear.png|150px]]<br><br>
[[File:Annotatedlinear.png|150px]]
[[File:Txtlinear.png|150px]]
[[File:Annotatedlinearincreaseplusminus.png|150px]]
[[File:Txtlinearincrease.png|150px]]
[[File:Annotatedlinearnullify.png|150px]]
[[File:TxtlinearnullifyFirstValMinusFive.png|150px]]
[[File:Annotatedlinearreduceplusminus.png|150px]]<br><br>
[[File:Txtlinearreduce.png|150px]]<br><br>
[[File:Annotatedquadratic.png|150px]]
[[File:Txtquadratic.png|150px]]
[[File:Annotatedroot.png|150px]]
[[File:Txtroot.png|150px]]
[[File:Annotatedsinus.png|150px]]
[[File:Txtsinus.png|150px]]
[[File:Annotatedsmoothstep.png|150px]]
[[File:Txtsmoothstep.png|150px]]