|
brazos-trapezoidal
|
#include "MathLib.h"
Go to the source code of this file.
Macros | |
| #define | SIN_TABLE_SIZE 256 |
| #define | COS_TABLE_OFFSET 64 |
| #define | SQRTROOT_TABLE_SIZE (sizeof(SquareRootTable)/2) |
| #define | FACTOR_DIVIDER ((int32_t)32768/SQRTROOT_TABLE_SIZE) |
Functions | |
| float32_t | MathLib_Sqrt (float32_t value) |
| Calculates the square root of a floating point number. More... | |
| float32_t | MathLib_SqrtFlt (float32_t value) |
| Calculates the square root of a floating point number. More... | |
| float32_t | MathLib_SqrtFromInvSqrt (float32_t x) |
| Calculates the square root of a floating point number using the invSqrt method Referemce: https://betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/. More... | |
| void | MathLib_SinCos (mc_t theta, trig_t *sinCos) |
| Sin and Cosine calculation of a floating point angle. More... | |
| mc_t | MathLib_Atan (mc_t a) |
| Return the atan of a floating point number. More... | |
| mc_t | MathLib_Atan2 (mc_t y, mc_t x) |
| Atan2 function, it calculates the atan based on the x and y values. More... | |
| mc_t | MathLib_Mod (mc_t x, mc_t y) |
| Modulus function, it calculates hypotenusa. More... | |
| void | MathLib_SinCosModAb (AlphaBeta_t *ab, mc_t mod, trig_t *sinCos) |
| Modulus function, it calculates hypotenusa. More... | |
Variables | |
| const int16_t | SquareRootTable [] |
| const float32_t | SquareRootFltTable [] |
Definition in file MathLib_Float.c.
| #define COS_TABLE_OFFSET 64 |
Definition at line 25 of file MathLib_Float.c.
| #define FACTOR_DIVIDER ((int32_t)32768/SQRTROOT_TABLE_SIZE) |
Definition at line 197 of file MathLib_Float.c.
| #define SIN_TABLE_SIZE 256 |
Definition at line 24 of file MathLib_Float.c.
| #define SQRTROOT_TABLE_SIZE (sizeof(SquareRootTable)/2) |
Definition at line 196 of file MathLib_Float.c.
| mc_t MathLib_Atan | ( | mc_t | a | ) |
Return the atan of a floating point number.
| Floating | point value to calculate the Atan |
Definition at line 636 of file MathLib_Float.c.
| mc_t MathLib_Atan2 | ( | mc_t | y, |
| mc_t | x | ||
| ) |
Atan2 function, it calculates the atan based on the x and y values.
| y | y-axis value to be calculated |
| x | x-axis value to be calculated |
Definition at line 650 of file MathLib_Float.c.
| mc_t MathLib_Mod | ( | mc_t | x, |
| mc_t | y | ||
| ) |
Modulus function, it calculates hypotenusa.
| y | y-axis value to be calculated |
| x | x-axis value to be calculated |
Definition at line 663 of file MathLib_Float.c.
| void MathLib_SinCos | ( | mc_t | theta, |
| trig_t * | sinCos | ||
| ) |
Sin and Cosine calculation of a floating point angle.
| theta | the angle |
| sinCos | pointer to the struct that will hold the results |
Definition at line 591 of file MathLib_Float.c.
| void MathLib_SinCosModAb | ( | AlphaBeta_t * | ab, |
| mc_t | mod, | ||
| trig_t * | sinCos | ||
| ) |
Modulus function, it calculates hypotenusa.
| y | y-axis value to be calculated |
| x | x-axis value to be calculated |
Definition at line 676 of file MathLib_Float.c.
| float32_t MathLib_Sqrt | ( | float32_t | value | ) |
Calculates the square root of a floating point number.
| Floating | point input |
Definition at line 489 of file MathLib_Float.c.
| float32_t MathLib_SqrtFlt | ( | float32_t | value | ) |
Calculates the square root of a floating point number.
| Floating | point input |
Definition at line 523 of file MathLib_Float.c.
| float32_t MathLib_SqrtFromInvSqrt | ( | float32_t | x | ) |
Calculates the square root of a floating point number using the invSqrt method Referemce: https://betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/.
| Floating | point input |
Definition at line 565 of file MathLib_Float.c.
| const float32_t SquareRootFltTable[] |
Definition at line 207 of file MathLib_Float.c.
| const int16_t SquareRootTable[] |
Definition at line 65 of file MathLib_Float.c.