mxbi / sourcebots

RGS Student Robotics Git
6 stars 0 forks source link

Implement arduino median function #6

Closed mxbi closed 6 years ago

mxbi commented 6 years ago

Right now taking the median of three numbers on the arduino involves including the entire standard library and filling up 80% of the arduino's RAM. This seems a bit... excessive.

Can we make a simpler solution?

Ideally, it would be able to take the median of an arbitrary number of elements. But we can live with a solution that takes just three elements. We need a C++ function that, given an array[] of three floats, returns the median value.

mxbi commented 6 years ago

This still needs to be done my friends