Find a number out of a given Integer array. It can return the closest, smaller and larger number to the integer requested.

Revision:
2:450e31ab4a55
Child:
3:3cc233c5aa00
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/find_number.h	Fri Dec 15 23:11:02 2017 +0000
@@ -0,0 +1,38 @@
+#ifndef find_number_h
+#define find_number_h
+
+/**
+ * Includes
+ */
+#include "mbed.h"
+
+/**
+ * Defines
+ */
+
+
+
+class find_number
+{
+public:
+
+        /**
+     * Constructor.
+     */
+    find_closest_number(int32_t  *selectable_values,int32_t cells_in_array);
+
+    int32_t find_closest(int32_t target_value);
+
+    int32_t find_larger(int32_t target_value);
+
+    int32_t find_smaller(int32_t target_value);
+
+private:
+
+    int32_t searched_array_size;
+    
+    int32_t *selectable_values_array;
+    
+};
+
+#endif
\ No newline at end of file