Smarter MIN, MAX, ABS macros
Use macros that explicitly avoid double-evaluation and can be used for any datatype, replacing `min`, `max`, `abs`, `fabs`, `labs`, and `FABS`. Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
@ -64,7 +64,7 @@
|
||||
const float mlx = max_length(X_AXIS),
|
||||
mly = max_length(Y_AXIS),
|
||||
mlratio = mlx > mly ? mly / mlx : mlx / mly,
|
||||
fr_mm_s = min(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * SQRT(sq(mlratio) + 1.0);
|
||||
fr_mm_s = MIN(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * SQRT(sq(mlratio) + 1.0);
|
||||
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
sensorless_homing_per_axis(X_AXIS);
|
||||
|
@ -129,7 +129,7 @@ void GcodeSuite::M48() {
|
||||
(int) (0.1250000000 * (DELTA_PRINTABLE_RADIUS)),
|
||||
(int) (0.3333333333 * (DELTA_PRINTABLE_RADIUS))
|
||||
#else
|
||||
(int) 5.0, (int) (0.125 * min(X_BED_SIZE, Y_BED_SIZE))
|
||||
(int) 5.0, (int) (0.125 * MIN(X_BED_SIZE, Y_BED_SIZE))
|
||||
#endif
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user