Function pfield::softSaturateNorm
Defined in File pfield_common.hpp
Function Documentation
-
inline Eigen::Vector3d pfield::softSaturateNorm(const Eigen::Vector3d &v, double maxNorm, double beta = 1.0)
Given a vector (typically linear or angular velocity), a maximum norm, and an optional ‘softness’ parameter beta, applies a soft saturation.
- Parameters:
v – The 3D vector to be saturated
maxNorm – The maximum allowed norm
beta – Softness parameter for the saturation, higher = more abrupt (default=1.0)
- Returns:
Eigen::Vector3d The saturated vector