ControlMath: by value to reference

This commit is contained in:
Dennis Mannhart
2018-02-08 09:20:47 +01:00
committed by Lorenz Meier
parent 3c40aa0d9c
commit ae0f02f67d
2 changed files with 2 additions and 2 deletions
@@ -132,7 +132,7 @@ vehicle_attitude_setpoint_s thrustToAttitude(const matrix::Vector3f &thr_sp, con
* constraint: ||vf|| <= max
* solve for s: ||vf|| = ||v0 + s * u1|| <= max
*/
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f v1, const float max)
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f &v1, const float max)
{
if (matrix::Vector2f(v0 + v1).norm() <= max) {
@@ -47,5 +47,5 @@
namespace ControlMath
{
vehicle_attitude_setpoint_s thrustToAttitude(const matrix::Vector3f &thr_sp, const float yaw_sp);
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f v1, const float max);
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f &v1, const float max);
}