public float DualFibonacci() { if (prandDoubler == null) { prandDoubler = new RPseudoRandF(); prandDoubler.Iterate(iDualIterationOffset); } return(RMath.SafeAdd(prandDoubler.Fibonacci(), Fibonacci())); }
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; }
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); }