Inductance Testing Code

Dependencies:   mbed

Fork of CurrentModeSine by Austin Brown

Revision:
1:64b881306f6f
Parent:
0:9edd6ec0f56a
--- a/math_ops/math_ops.cpp	Sat May 20 21:42:20 2017 +0000
+++ b/math_ops/math_ops.cpp	Thu Oct 11 04:13:45 2018 +0000
@@ -25,3 +25,13 @@
         *y = *y * limit/norm;
         }
     }
+    
+void limit_abs(float *x, float limit){
+    limit = abs(limit);
+    if(*x > limit){
+        *x = limit;
+        }
+    if(*x < -limit){
+        *x = -limit;
+        }
+    }