From 5aca6ff4f2816d8e55281ebe7e7cbcbe49777572 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Sep 2022 17:30:53 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20some=20vector=5F3=20cast?= =?UTF-8?q?=20operators?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/libs/vector_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/libs/vector_3.h b/Marlin/src/libs/vector_3.h index f515333cc7..58bdb43c7b 100644 --- a/Marlin/src/libs/vector_3.h +++ b/Marlin/src/libs/vector_3.h @@ -75,8 +75,8 @@ struct vector_3 { vector_3 operator-(const vector_3 &v) { return vector_3(x - v.x, y - v.y, z - v.z); } vector_3 operator*(const float &v) { return vector_3(x * v, y * v, z * v); } - operator xy_float_t() { return xy_float_t({ x, y }); } - operator xyz_float_t() { return xyz_float_t({ x, y, z }); } + operator xy_float_t() { return xy_float_t({ x OPTARG(HAS_Y_AXIS, y) }); } + operator xyz_float_t() { return xyz_float_t({ x OPTARG(HAS_Y_AXIS, y) OPTARG(HAS_Z_AXIS, z) }); } void debug(FSTR_P const title); };