1#ifndef RENNSSELAERMOTORSPORT_LUT_H
2#define RENNSSELAERMOTORSPORT_LUT_H
36#define TABLE_CAPACITY 64
int point_compare(const void *a, const void *b)
Compares two points by input.
bool table_is_initialized(table *table)
Checks if the table has been fully initialized, with all reference points added.
bool table_sample(table *table, float in, float *out)
Samples a output value from the table for an input value.
bool table_init(table *table, uint16_t count)
Initializes the table.
const point * table_min_point(table *table)
Retrieves the point in the table with the least input value.
bool table_can_sample(table *table, float in)
Checks if the input input is valid for the table.
bool point_is_between(const point *min, const point *max, float in)
Determines if the input value is between the input of two points.
const point * table_max_point(table *table)
Retrieves the point in the table with the greatest input value.
bool table_add_reference_point(table *table, float in, float out)
Adds a reference point to the table.