Esempio n. 1
0
    private static double pGetGaussianRandomNumber3(EntropySettings settings)
    {
        double value;

        switch (settings.getValue(EntropySettings.properties_i.rngType))
        {
        case (int)commonRNG.rngIndex.crypto:
            value = Crypto_RNG.random_gauss3()[0];
            break;

        case (int)commonRNG.rngIndex.mtwister:
            value = MersenneTwister_RNG.random_gauss3()[0];
            break;

        default:
            value = RNG.random_gauss3()[0];
            break;
        }
        return(value);
    }
Esempio n. 2
0
    private void pChaosSettings_implant(bool previewMode_, EntropySettings entropySettings)
    {
        previewMode = previewMode_;
        if (previewMode)
        {
            implant_resistCDVar     = 0;
            implant_resistHeightVar = 0;
            implant_resistTopCRRVar = 0;
            implant_tiltVar         = 0;
            implant_twistVar        = 0;
        }
        else
        {
            switch (entropySettings.getValue(EntropySettings.properties_i.rngType))
            {
            case (int)commonRNG.rngIndex.mtwister:
                implant_resistCDVar     = MersenneTwister_RNG.random_gauss3()[0];
                implant_resistHeightVar = MersenneTwister_RNG.random_gauss3()[0];
                implant_resistTopCRRVar = MersenneTwister_RNG.random_gauss3()[0];
                implant_tiltVar         = MersenneTwister_RNG.random_gauss3()[0];
                implant_twistVar        = MersenneTwister_RNG.random_gauss3()[0];
                break;

            case (int)commonRNG.rngIndex.crypto:
                implant_resistCDVar     = Crypto_RNG.random_gauss3()[0];
                implant_resistHeightVar = Crypto_RNG.random_gauss3()[0];
                implant_resistTopCRRVar = Crypto_RNG.random_gauss3()[0];
                implant_tiltVar         = Crypto_RNG.random_gauss3()[0];
                implant_twistVar        = Crypto_RNG.random_gauss3()[0];
                break;

            default:
                implant_resistCDVar     = RNG.random_gauss3()[0];
                implant_resistHeightVar = RNG.random_gauss3()[0];
                implant_resistTopCRRVar = RNG.random_gauss3()[0];
                implant_tiltVar         = RNG.random_gauss3()[0];
                implant_twistVar        = RNG.random_gauss3()[0];
                break;
            }
        }
    }