Motor control for robots. More compact, less object-oriented revision.

**
Dependencies:
**
CANnucleo
FastPWM3
mbed

**Fork of**
Hobbyking_Cheetah_V1
by

## math_ops.cpp

- Committer:
- benkatz
- Date:
- 2 weeks ago
- Revision:
**23:2adf23ee0305**

### File content as of revision 23:2adf23ee0305:

#include "math_ops.h" float fmaxf(float x, float y){ return (((x)>(y))?(x):(y)); } float fminf(float x, float y){ return (((x)<(y))?(x):(y)); } float fmaxf3(float x, float y, float z){ return (x > y ? (x > z ? x : z) : (y > z ? y : z)); } float fminf3(float x, float y, float z){ return (x < y ? (x < z ? x : z) : (y < z ? y : z)); } void limit_norm(float *x, float *y, float limit){ float norm = sqrt(*x * *x + *y * *y); if(norm > limit){ *x = *x * limit/norm; *y = *y * limit/norm; } }