MBot Software Library  v1.0
An API documentation to mbot_firmware repository
Classes | Macros | Functions
other.c File Reference

general low-level math functions that don't fit elsewhere More...

#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <rc/math/other.h>
Include dependency graph for other.c:

Classes

union  rc_int_float_t
 
union  rc_int_double_t
 

Macros

#define unlikely(x)   __builtin_expect (!!(x), 0)
 

Functions

float rc_get_random_float (void)
 Returns a random floating point number between -1 and 1. More...
 
double rc_get_random_double (void)
 Returns a random double-precision floating point number between -1 and 1. More...
 
int rc_saturate_float (float *val, float min, float max)
 Modifies val to be bounded between between min and max. More...
 
int rc_saturate_double (double *val, double min, double max)
 Modifies val to be bounded between between min and max. More...
 

Detailed Description

general low-level math functions that don't fit elsewhere

Author
James Strawson
Date
2016