Skip to content
Snippets Groups Projects
Commit 662c206c authored by Thunder's avatar Thunder Committed by Daniel Agar
Browse files

fix ControlMath.cpp mathematical derivation error (#10796)

parent 428c2f72
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@ Vector2f constrainXY(const Vector2f &v0, const Vector2f &v1, const float &max)
// v0(0/1/2) -> v0/1/2
// u1(0/1/2) -> u0/1/2
//
// ||v + s * u||^2 = (v0+s*u0)^2+(v1+s*u1)^2+(v1+s*u1)^2 = max^2
// ||v + s * u||^2 = (v0+s*u0)^2+(v1+s*u1)^2+(v2+s*u2)^2 = max^2
// v0^2+2*s*u0*v0+s^2*u0^2 + v1^2+2*s*u1*v1+s^2*u1^2 + v2^2+2*s*u2*v2+s^2*u2^2 = max^2
// s^2*(u0^2+u1^2+u2^2) + s*2*(u0*v0+u1*v1+u2*v2) + (v0^2+v1^2+v2^2-max^2) = 0
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment