Exemplo n.º 1
0
        private float Next()
        {
            float next = 0f;

            //-- Discrepancy --
            //- High Discrepancy ("normal" random numbers / white noise) -
            if (!lowDiscrepancy)
            {
                next = simpleRng.GetFloatRange(0f, 1f);
            }
            //- Low Discrepancy (Grid & Jitter) -
            else
            {
                next = NextLowDiscrepancyFloat();
            }

            //-- Probability Distribution --
            //- Custom Distribution -
            if (probabilityDistribution == ProbabilityDistribution.Custom)
            {
                next = animationCurveSampler.Sample(next);
            }
            //- else: Uniform Probability Distribution -

            //-- Min Max Range --
            next = MathW.Remap(next, 0f, 1f, min, max);

            //-- Return final value --
            return(next);
        }