Skip to main content

clamp_impulse

Function clamp_impulse 

Source
pub fn clamp_impulse(lambda_n: f64, lambda_t: [f64; 2], mu: f64) -> [f64; 2]
Expand description

Clamp an impulse to the friction cone.

lambda_n — normal impulse (must be ≥ 0). lambda_t — current tangential impulse vector [lt_x, lt_y]. mu — friction coefficient.

Returns the clamped tangential impulse.