auto-measurements

Dependencies:   FastPWM3 mbed-dev

Fork of Hobbyking_Cheetah_Compact by Ben Katz

Revision:
20:bf9ea5125d52
Parent:
0:4e1c4df6aabd
--- a/FastMath/FastMath.cpp	Tue Feb 14 03:28:16 2017 +0000
+++ b/FastMath/FastMath.cpp	Thu Mar 02 15:31:23 2017 +0000
@@ -4,8 +4,8 @@
 const float Multiplier = 81.4873308631f;
 
 float FastMath::FastSin(float theta){
-    if (theta < 0.0f) theta += 6.28318530718f;
-    if (theta >= 6.28318530718f) theta -= 6.28318530718f;    
+    while (theta < 0.0f) theta += 6.28318530718f;
+    while (theta >= 6.28318530718f) theta -= 6.28318530718f;    
     return SinTable[(int) (Multiplier*theta)] ;
     }