nobleo / path_tracking_pid

Path Tracking PID offers a tuneable PID control loop, decouling steering and forward velocity
Apache License 2.0
130 stars 37 forks source link

Moved distSquared() helpers. #63

Closed lewie-donckers closed 2 years ago

lewie-donckers commented 2 years ago

Moved the distSquared() helper functions from static members to the anonymous namespace in the source file.

Will allow me to use them in other helper files in that namespace in the future.

Also refactored the implementation to avoid the duplicate sub-expressions and simply use a library function.