Find a number out of a given Integer array. It can return the closest, smaller and larger number to the integer requested.
find_number.h
- Committer:
- O_Shovah
- Date:
- 2017-12-15
- Revision:
- 2:450e31ab4a55
- Child:
- 3:3cc233c5aa00
File content as of revision 2:450e31ab4a55:
#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