![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ECE 2036 Project
Dependencies: mbed wave_player 4DGL-uLCD-SE
math_extra.h@0:cf4396614a79, 2017-11-03 (annotated)
- Committer:
- rconnorlawson
- Date:
- Fri Nov 03 18:48:48 2017 +0000
- Revision:
- 0:cf4396614a79
Emptied shell code (including doubly linked list) and added comments for all the functionality.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rconnorlawson | 0:cf4396614a79 | 1 | #pragma once |
rconnorlawson | 0:cf4396614a79 | 2 | |
rconnorlawson | 0:cf4396614a79 | 3 | // True if lower < x < upper |
rconnorlawson | 0:cf4396614a79 | 4 | int in_range(int x, int lower, int upper); |
rconnorlawson | 0:cf4396614a79 | 5 | |
rconnorlawson | 0:cf4396614a79 | 6 | // Clamps the value of x to the range [-limit, limit] |
rconnorlawson | 0:cf4396614a79 | 7 | float clamp(float x, float limit); |
rconnorlawson | 0:cf4396614a79 | 8 | |
rconnorlawson | 0:cf4396614a79 | 9 | // Returns the sign of x (-1, 0, or 1). |
rconnorlawson | 0:cf4396614a79 | 10 | int sgn(float x); |
rconnorlawson | 0:cf4396614a79 | 11 | |
rconnorlawson | 0:cf4396614a79 | 12 | // Returns either -1.0 or 1.0, randomly |
rconnorlawson | 0:cf4396614a79 | 13 | float coin_flip(); |