using System; namespace Avalonia.Animation.Animators { /// /// Animator that handles properties. /// public class UInt32Animator : Animator { const double maxVal = (double)UInt32.MaxValue; /// public override UInt32 Interpolate(double progress, UInt32 oldValue, UInt32 newValue) { var normOV = oldValue / maxVal; var normNV = newValue / maxVal; var deltaV = normNV - normOV; return (UInt32)Math.Round(maxVal * ((deltaV * progress) + normOV)); } } }