Esempio n. 1
0
 public float DualFibonacci()
 {
     if (prandDoubler == null)
     {
         prandDoubler = new RPseudoRandF();
         prandDoubler.Iterate(iDualIterationOffset);
     }
     return(RMath.SafeAdd(prandDoubler.Fibonacci(), Fibonacci()));
 }
Esempio n. 2
0
 public void ResetDualFibonacci(int iIterations, float offset)
 {
     if (offset < 0)
     {
         offset = 0;
     }
     iDualIterationOffset       = iIterations;
     prandDoubler               = new RPseudoRandF();
     prandDoubler.fibonacciprev = offset;
     prandDoubler.Iterate(iDualIterationOffset);
     xDualFibonacciOffset = offset;
 }
Esempio n. 3
0
 public void ResetDualFibonacciToRPseudoRandom(int iIterations, float limit)
 {
     if (limit < 0)
     {
         limit = 0;
     }
     iDualIterationOffset = iIterations;
     if (prandDoubler == null)
     {
         prandDoubler = new RPseudoRandF();
     }
     prandDoubler.ResetFibonacciToRPseudoRandom(limit);
     prandDoubler.Iterate(iIterations);
     xDualFibonacciOffset = RMath.SafeSubtract(prandDoubler.fibonacciprev, fibonacciprev);
 }