join analogs and gyroscope
This commit is contained in:
parent
d208f5dc2a
commit
026e970615
8 changed files with 90 additions and 0 deletions
|
|
@ -5,3 +5,9 @@ int32_t div_round_closest(int32_t x, int32_t divisor) {
|
|||
const int32_t __d = divisor;
|
||||
return ((__x) > 0) == ((__d) > 0) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d));
|
||||
}
|
||||
|
||||
int64_t div_round_closest_i64(int64_t x, int64_t divisor) {
|
||||
const int64_t __x = x;
|
||||
const int64_t __d = divisor;
|
||||
return ((__x) > 0) == ((__d) > 0) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue