30 return (a + b) * 0.5f;
constexpr vector< T, N > max(const vector< T, N > &x, const vector< T, N > &y)
Returns a vector containing the maximum elements of two vectors.
constexpr vector< T, N > min(const vector< T, N > &x, const vector< T, N > &y)
Returns a vector containing the minimum elements of two vectors.
restitution_combine_mode
Specifies how coefficients of restitution should be calculated.
@ average
Coefficient of restitution is calculated as (a + b) / 2.
@ minimum
Coefficient of restitution is calculated as min(a, b).
float combine_restitution(float a, float b, restitution_combine_mode mode) noexcept
Combines two restitution values into a coefficient of restitution.