velox/Code/Base/Wheel/FrictionPreset.cs

17 lines
385 B
C#

using System;
namespace VeloX;
public class FrictionPreset
{
public float B { get; set; } = 10.86f;
public float C { get; set; } = 2.15f;
public float D { get; set; } = 0.933f;
public float E { get; set; } = 0.992f;
public float Evaluate( float slip )
{
var t = Math.Abs( slip );
return D * MathF.Sin( C * MathF.Atan( B * t - E * (B * t - MathF.Atan( B * t )) ) );
}
}