Category5.Victim.updateErrorAngle C# (CSharp) Method

updateErrorAngle() protected method

protected updateErrorAngle ( float factor, float clip ) : float
factor float
clip float
return float
        protected float updateErrorAngle(float factor, float clip)
        {
            errorAngle += (float)(rnd.NextDouble() - 0.5f) * factor;
            if (Math.Abs(errorAngle) > clip)
            {
                if (errorAngle < 0)
                    errorAngle = -clip;
                else
                    errorAngle = clip;
            }
            return errorAngle;
        }