XAML-Map-Control/MapControl/Avalonia/LocationAnimator.Avalonia.cs
ClemensFischer 560f44a139 Copyright
2025-01-01 18:57:55 +01:00

17 lines
593 B
C#

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
// Copyright © Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
namespace MapControl
{
public class LocationAnimator : InterpolatingAnimator<Location>
{
public override Location Interpolate(double progress, Location oldValue, Location newValue)
{
return new Location(
(1d - progress) * oldValue.Latitude + progress * newValue.Latitude,
(1d - progress) * oldValue.Longitude + progress * newValue.Longitude);
}
}
}