fork from bgkatz
Dependencies: mbed-dev-f303 FastPWM3
math_ops.h@45:aadebe074af6, 2018-07-30 (annotated)
- Committer:
- benkatz
- Date:
- Mon Jul 30 20:25:24 2018 +0000
- Revision:
- 45:aadebe074af6
- Parent:
- 34:51647c6c500d
fixed error in float_to_uint. Honestly I'm not sure how it worked before;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
benkatz | 20:bf9ea5125d52 | 1 | #ifndef MATH_OPS_H |
benkatz | 20:bf9ea5125d52 | 2 | #define MATH_OPS_H |
benkatz | 20:bf9ea5125d52 | 3 | |
benkatz | 20:bf9ea5125d52 | 4 | #define PI 3.14159265359f |
benkatz | 45:aadebe074af6 | 5 | #include "mbed.h" |
benkatz | 20:bf9ea5125d52 | 6 | #include "math.h" |
benkatz | 20:bf9ea5125d52 | 7 | |
benkatz | 20:bf9ea5125d52 | 8 | float fmaxf(float x, float y); |
benkatz | 20:bf9ea5125d52 | 9 | float fminf(float x, float y); |
benkatz | 20:bf9ea5125d52 | 10 | float fmaxf3(float x, float y, float z); |
benkatz | 20:bf9ea5125d52 | 11 | float fminf3(float x, float y, float z); |
benkatz | 34:51647c6c500d | 12 | float roundf(float x); |
benkatz | 20:bf9ea5125d52 | 13 | void limit_norm(float *x, float *y, float limit); |
benkatz | 45:aadebe074af6 | 14 | int float_to_uint(float x, float x_min, float x_max, uint8_t bits); |
benkatz | 45:aadebe074af6 | 15 | float uint_to_float(int x_int, float x_min, float x_max, uint8_t bits); |
benkatz | 20:bf9ea5125d52 | 16 | |
benkatz | 20:bf9ea5125d52 | 17 | #endif |