public void CalculateIntensity_LinearOneToZeroAtTimeZero_IsOne() { var modulator = new CurveTimeModulator(linearOneToZero, 3.0f); var intensity = modulator.CalculateIntensity(RumbleIntensity.One, 0.0f); Assert.That(intensity, Is.EqualTo(RumbleIntensity.One)); }
public void CalculateIntensity_HalfTimeAfterLoop_IsHalf() { var modulator = new CurveTimeModulator(linearOneToZero, 2.0f); var intensity = modulator.CalculateIntensity(RumbleIntensity.One, 3.0f); Assert.That(intensity, Is.EqualTo( new RumbleIntensity( ForceFeedbackIntensities.One * 0.5f, ScreenShakeIntensities.One * 0.5f))); }