public void validate_static_method_getdirectionforisotropicdistributionrandom() { Random rng = new MathNet.Numerics.Random.MersenneTwister(0); var dir = SourceToolbox.GetDirectionForIsotropicDistributionRandom(rng); Assert.Less(Math.Abs(dir.Ux - _tp[37]), ACCEPTABLE_PRECISION); Assert.Less(Math.Abs(dir.Uy - _tp[38]), ACCEPTABLE_PRECISION); Assert.Less(Math.Abs(dir.Uz - _tp[39]), ACCEPTABLE_PRECISION); }
/// <summary> /// Returns direction /// </summary> /// <returns>new direction</returns> protected override Direction GetFinalDirection() { return(SourceToolbox.GetDirectionForIsotropicDistributionRandom(Rng)); }