Mine
public text v1 · immutablefor( int i = 0; i < ConstrainedPoints.Count; i++ )
{
if( i < ConstrainedPoints.Count - 1 )
{
Vector2 offset = ConstrainedPoints[ i + 1 ] - ConstrainedPoints[ i ];
Vector2 offsetDir = offset;
offset.Normalize( );
float displacement = offset.Length( ) - 50;
float K = 10.0f;
Vector2 force = offsetDir * displacement * K;
ConstrainedPoints[ i + 1 ] += force;
}
}