Searched refs:y_axis (Results 1 – 3 of 3) sorted by relevance
/Zephyr-latest/tests/lib/math/interpolation/src/ |
D | main.c | 14 int32_t y_axis[] = {20, 22, 24, 28, 36}; in ZTEST() local 17 zassert_equal(ARRAY_SIZE(x_axis), ARRAY_SIZE(y_axis)); in ZTEST() 19 zassert_equal(y_axis[0], linear_interpolate(x_axis, y_axis, len, INT32_MIN)); in ZTEST() 20 zassert_equal(y_axis[0], linear_interpolate(x_axis, y_axis, len, -1)); in ZTEST() 21 zassert_equal(y_axis[0], linear_interpolate(x_axis, y_axis, len, 0)); in ZTEST() 22 zassert_equal(y_axis[0], linear_interpolate(x_axis, y_axis, len, x_axis[0] - 1)); in ZTEST() 24 zassert_equal(y_axis[4], linear_interpolate(x_axis, y_axis, len, x_axis[4] + 1)); in ZTEST() 25 zassert_equal(y_axis[4], linear_interpolate(x_axis, y_axis, len, 100)); in ZTEST() 26 zassert_equal(y_axis[4], linear_interpolate(x_axis, y_axis, len, INT32_MAX)); in ZTEST() 32 int32_t y_axis[] = {20, 22, 24, 28, 36}; in ZTEST() local [all …]
|
/Zephyr-latest/include/zephyr/math/ |
D | interpolation.h | 37 static inline int32_t linear_interpolate(const int32_t *x_axis, const int32_t *y_axis, uint8_t len, in linear_interpolate() argument 46 return y_axis[0]; in linear_interpolate() 48 return y_axis[len - 1]; in linear_interpolate() 59 return y_axis[idx_low]; in linear_interpolate() 63 rise = y_axis[idx_low + 1] - y_axis[idx_low]; in linear_interpolate() 68 return roundf(y_axis[idx_low] + (slope * x_shifted)); in linear_interpolate()
|
/Zephyr-latest/drivers/sensor/bosch/bmg160/ |
D | bmg160.c | 207 uint16_t y_axis; in bmg160_sample_fetch() member 219 bmg160->raw_gyro_xyz[1] = sys_le16_to_cpu(buf.y_axis); in bmg160_sample_fetch()
|