Пример #1
0
 public float DualFibonacci()
 {
     if (prandDoubler == null)
     {
         prandDoubler = new RPseudoRandF();
         prandDoubler.Iterate(iDualIterationOffset);
     }
     return(RMath.SafeAdd(prandDoubler.Fibonacci(), Fibonacci()));
 }
Пример #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;
 }
Пример #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);
 }