Пример #1
0
        private void calculateSpecificStrain(VitaruHitObjectDifficulty previousHitObject, VitaruDifficultyCalculator.DifficultyType type, double timeRate)
        {
            double addition    = 0;
            double timeElapsed = (BaseHitObject.StartTime - previousHitObject.BaseHitObject.StartTime) / timeRate;
            double decay       = Math.Pow(DECAY_BASE[(int)type], timeElapsed / 1000);

            if (BaseHitObject.Type == HitObjectType.Enemy)
            {
                addition = spacingWeight(DistanceTo(previousHitObject), type) * spacing_weight_scaling[(int)type];
            }

            // You will never find maps that require this amongst ranked maps.
            addition /= Math.Max(timeElapsed, 50);

            Strains[(int)type] = previousHitObject.Strains[(int)type] * decay + addition;
        }
Пример #2
0
 internal void CalculateStrains(VitaruHitObjectDifficulty previousHitObject, double timeRate)
 {
     calculateSpecificStrain(previousHitObject, VitaruDifficultyCalculator.DifficultyType.Speed, timeRate);
     calculateSpecificStrain(previousHitObject, VitaruDifficultyCalculator.DifficultyType.Aim, timeRate);
 }
Пример #3
0
 internal double DistanceTo(VitaruHitObjectDifficulty other)
 {
     // Scale the distance by hitbox size.
     return((startPosition - other.endPosition).Length * scalingFactor);
 }