- Authors
- Arduino team, Avik De avikd.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om
This file is part of koduino https://github.com/avikde/koduino
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, see http://www.gnu.org/licenses/.
|
void | randomSeed (uint32_t dwSeed) |
|
float | map (float x, float in_min, float in_max, float out_min, float out_max) |
| Map a float (different from Arduino implementation) More...
|
|
float | interp1 (float from, float to, float frac) |
| Linear interpolation between given endpoints. More...
|
|
float | fmodf_mpi_pi (float f) |
| Mod an angle to between -PI and PI. More...
|
|
float | fmodf_0_2pi (float f) |
| Mod an angle to between 0 and 2*PI. More...
|
|
float | fmodf_0_1 (float f) |
| Mod between 0 and 1. More...
|
|
float | fmodf_mp5_p5 (float f) |
| Mod between -0.5 and +0.5. More...
|
|
void | circleMeanDiff (float a, float b, float *mean, float *diff) |
| Change coords to mean and diff on a circle (accounting for wraparound) More...
|
|
void | swapByte (uint8_t *a, uint8_t *b) |
| Swaps the values pointed to be a and b.
|
|
void | setOutPtrSafe (float *out, float val) |
| Convenient function to safely (watch for NULL passed) set an output var. More...
|
|
void | matMult (uint16_t nr1, uint16_t nc1, uint16_t nc2, float *m1, float *m2, float *mout) |
| Use arm_mat_mult_f32 to multiply two matrices. More...
|
|
void circleMeanDiff |
( |
float |
a, |
|
|
float |
b, |
|
|
float * |
mean, |
|
|
float * |
diff |
|
) |
| |
Change coords to mean and diff on a circle (accounting for wraparound)
- Parameters
-
a | First angle in rad |
b | Second angle in rad |
mean | Mean angle |
diff | Difference angle |
float fmodf_0_1 |
( |
float |
f | ) |
|
Mod between 0 and 1.
- Parameters
-
- Returns
- Result between 0 and 1
float fmodf_0_2pi |
( |
float |
f | ) |
|
Mod an angle to between 0 and 2*PI.
- Parameters
-
- Returns
- Result between 0 and 2*PI
float fmodf_mp5_p5 |
( |
float |
f | ) |
|
Mod between -0.5 and +0.5.
- Parameters
-
- Returns
- Result between -0.5 and +0.5
float fmodf_mpi_pi |
( |
float |
f | ) |
|
Mod an angle to between -PI and PI.
- Parameters
-
- Returns
- Result between -PI and PI
float interp1 |
( |
float |
from, |
|
|
float |
to, |
|
|
float |
frac |
|
) |
| |
Linear interpolation between given endpoints.
- Parameters
-
from | Lower endpoint |
to | Higher endpoint |
frac | float between 0.0 and 1.0 |
- Returns
- Interpolated value
float map |
( |
float |
x, |
|
|
float |
in_min, |
|
|
float |
in_max, |
|
|
float |
out_min, |
|
|
float |
out_max |
|
) |
| |
Map a float (different from Arduino implementation)
- Parameters
-
- Returns
- x mapped from [in_min, in_max] to [out_min, out_max]
void matMult |
( |
uint16_t |
nr1, |
|
|
uint16_t |
nc1, |
|
|
uint16_t |
nc2, |
|
|
float * |
m1, |
|
|
float * |
m2, |
|
|
float * |
mout |
|
) |
| |
Use arm_mat_mult_f32 to multiply two matrices.
- Parameters
-
nr1 | Number of rows of M1 |
nc1 | Number of columns of M1 ( = number of rows of M2) |
nc2 | Number of columns of M2 |
m1 | Pointer to contents of M1 (row major) |
m2 | Pointer to contents of M2 (row major) |
mout | Preallocated array (nr1*nc2) for contents of M1*M2 |
void randomSeed |
( |
uint32_t |
dwSeed | ) |
|
Part of the Wiring project - http://wiring.org.co Copyright (c) 2004-06 Hernando Barragan Modified by David A. Mellis for Arduino - http://www.arduino.cc/, Avik De avikd.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om
This file is part of koduino https://github.com/avikde/koduino
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, see http://www.gnu.org/licenses/.
void setOutPtrSafe |
( |
float * |
out, |
|
|
float |
val |
|
) |
| |
Convenient function to safely (watch for NULL passed) set an output var.
- Parameters
-
out | Output variable (pointer) which could be NULL |
val | Value to assign to output |