p kj
/
LPC824-BalanceCar
Microduino
Fork of BalanceCar by
Diff: helper_3dmath.h
- Revision:
- 1:620da20b810b
- Parent:
- 0:a4d8f5b3c546
--- a/helper_3dmath.h Sat Jun 04 03:16:52 2016 +0000 +++ b/helper_3dmath.h Sat Jun 04 04:06:36 2016 +0000 @@ -108,8 +108,7 @@ } float getMagnitude() { - //return sqrt((x*x) + (y*y) + (z*z)); - return 0; + return sqrt((float)(x*x + y*y + z*z)); } void normalize() {