Easier to find 'static inline'
This commit is contained in:
@ -361,7 +361,7 @@ class Planner {
|
||||
* Returns 1.0 if planner.z_fade_height is 0.0.
|
||||
* Returns 0.0 if Z is past the specified 'Fade Height'.
|
||||
*/
|
||||
inline static float fade_scaling_factor_for_z(const float &rz) {
|
||||
static inline float fade_scaling_factor_for_z(const float &rz) {
|
||||
static float z_fade_factor = 1;
|
||||
if (z_fade_height) {
|
||||
if (rz >= z_fade_height) return 0;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#define SIGMA 0.1f
|
||||
|
||||
// Compute the linear interpolation between two real numbers.
|
||||
inline static float interp(float a, float b, float t) { return (1 - t) * a + t * b; }
|
||||
static inline float interp(const float &a, const float &b, const float &t) { return (1 - t) * a + t * b; }
|
||||
|
||||
/**
|
||||
* Compute a Bézier curve using the De Casteljau's algorithm (see
|
||||
@ -53,21 +53,20 @@ inline static float interp(float a, float b, float t) { return (1 - t) * a + t *
|
||||
* easy to code and has good numerical stability (very important,
|
||||
* since Arudino works with limited precision real numbers).
|
||||
*/
|
||||
inline static float eval_bezier(float a, float b, float c, float d, float t) {
|
||||
float iab = interp(a, b, t);
|
||||
float ibc = interp(b, c, t);
|
||||
float icd = interp(c, d, t);
|
||||
float iabc = interp(iab, ibc, t);
|
||||
float ibcd = interp(ibc, icd, t);
|
||||
float iabcd = interp(iabc, ibcd, t);
|
||||
return iabcd;
|
||||
static inline float eval_bezier(const float &a, const float &b, const float &c, const float &d, const float &t) {
|
||||
const float iab = interp(a, b, t),
|
||||
ibc = interp(b, c, t),
|
||||
icd = interp(c, d, t),
|
||||
iabc = interp(iab, ibc, t),
|
||||
ibcd = interp(ibc, icd, t);
|
||||
return interp(iabc, ibcd, t);
|
||||
}
|
||||
|
||||
/**
|
||||
* We approximate Euclidean distance with the sum of the coordinates
|
||||
* offset (so-called "norm 1"), which is quicker to compute.
|
||||
*/
|
||||
inline static float dist1(float x1, float y1, float x2, float y2) { return ABS(x1 - x2) + ABS(y1 - y2); }
|
||||
static inline float dist1(const float &x1, const float &y1, const float &x2, const float &y2) { return ABS(x1 - x2) + ABS(y1 - y2); }
|
||||
|
||||
/**
|
||||
* The algorithm for computing the step is loosely based on the one in Kig
|
||||
|
@ -435,7 +435,7 @@ class Stepper {
|
||||
#endif
|
||||
|
||||
// Set the current position in steps
|
||||
inline static void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) {
|
||||
static inline void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) {
|
||||
planner.synchronize();
|
||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
@ -443,7 +443,7 @@ class Stepper {
|
||||
if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
}
|
||||
|
||||
inline static void set_position(const AxisEnum a, const int32_t &v) {
|
||||
static inline void set_position(const AxisEnum a, const int32_t &v) {
|
||||
planner.synchronize();
|
||||
|
||||
#ifdef __AVR__
|
||||
|
Reference in New Issue
Block a user