// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) VRMADA, All rights reserved.
//
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
namespace UltimateXR.Animation.Interpolation
{
///
/// Interpolator for .
///
public class UxrVector2Interpolator : UxrVarInterpolator
{
#region Constructors & Finalizer
///
/// Constructor.
///
/// Smooth damp for interpolation [0.0, 1.0] where 0.0 means no smoothing
/// Whether to use step interpolation, where the interpolation will always return the start value
public UxrVector2Interpolator(float smoothDamp = 0.0f, bool useStep = false) : base(smoothDamp, useStep)
{
}
#endregion
#region Protected Overrides UxrVarInterpolator
///
protected override Vector2 GetInterpolatedValue(Vector2 a, Vector2 b, float t)
{
return Vector2.Lerp(a, b, t);
}
#endregion
#region Public Types & Data
///
/// Default interpolator with smoothing.
///
public static readonly UxrVector2Interpolator DefaultInterpolator = new UxrVector2Interpolator(0.0f, false);
#endregion
}
}