Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Common math functionality. More...
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | math_abs(x) |
Absolute value. | |
Functions | |
uint8_t | math_sqrt16 (uint16_t x) |
Compute square root of unsigned 16 bit number. | |
uint16_t | math_sqrt32 (uint32_t x) |
Compute square root of unsigned 32 bit number. | |
uint32_t | math_sqrt64 (uint64_t x) |
Compute square root of unsigned 64 bit number. | |
float | math_inverse_sqrt32 (float x) |
Fast inverse square root. | |
uint32_t | math_vector_xy_sq_magnitude (int16_t x, int16_t y) |
Compute the squared magnitude of an XY vector. | |
uint16_t | math_vector_xy_magnitude (int16_t x, int16_t y) |
Compute the magnitude of an XY vector. | |
uint32_t | math_vector_xyz_sq_magnitude (int16_t x, int16_t y, int16_t z) |
Compute the squared magnitude of an XYZ vector. | |
uint16_t | math_vector_xyz_magnitude (int16_t x, int16_t y, int16_t z) |
Compute the magnitude of an XYZ vector. | |
int64_t | math_vector_xyz_dot_product (int16_t ax, int16_t ay, int16_t az, int16_t bx, int16_t by, int16_t bz) |
Compute the dot product of two XYZ vectors. | |
int32_t | math_vector_xyz_dot_product_fast (int16_t ax, int16_t ay, int16_t az, int16_t bx, int16_t by, int16_t bz) |
Compute the dot product of two XYZ vectors. | |
uint32_t | math_bitmask_get_next_bits (uint32_t bitmask, uint8_t start_idx, uint8_t *next_idx, uint8_t num_bits) |
Get the next N bits of a bitmask, with rollover. | |
Common math functionality.
SPDX-License-Identifier: FSL-1.1-ALv2