// Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using Avalonia.Metadata; using System; using System.Reactive.Linq; namespace Avalonia.Animation { /// /// Transition class that handles with types. /// public class IntegerTransition : Transition { /// public override IObservable DoTransition(IObservable progress, int oldValue, int newValue) { var delta = newValue - oldValue; return progress .Select(p => (int)(Easing.Ease(p) * delta + oldValue)); } } }