/// <summary>
/// Home towards a target location at a fixed speed.
/// </summary>
/// <remarks>
/// Use with StopSampling to home for only a few seconds.
/// <para>This is primarily for use with non-rotational velocity.
/// Rotational use creates: contracting spirals (0,90), circle around player [90], expanding spiral (90,180).</para>
/// </remarks>
/// <param name="speed">Speed</param>
/// <param name="location">Target location</param>
/// <returns></returns>
public static ExTP VHome(ExBPY speed, ExTP location)
{
TExV2 l = new TExV2();
return(bpi => Ex.Block(new ParameterExpression[] { l },
Ex.Assign(l, location(bpi).Sub(bpi.loc)),
l.Mul(Ex.Divide(speed(bpi), Sqrt(Ex.Add(SqrMag(l), EPS))))
));
}