VectorAnimator.cs 449 B

1234567891011121314151617
  1. using System;
  2. using Avalonia.Logging;
  3. using Avalonia.Media;
  4. namespace Avalonia.Animation.Animators
  5. {
  6. /// <summary>
  7. /// Animator that handles <see cref="Vector"/> properties.
  8. /// </summary>
  9. public class VectorAnimator : Animator<Vector>
  10. {
  11. public override Vector Interpolate(double progress, Vector oldValue, Vector newValue)
  12. {
  13. return ((newValue - oldValue) * progress) + oldValue;
  14. }
  15. }
  16. }