Skip to content

Commit 5aca6ff

Browse files
committed
🩹 Fix some vector_3 cast operators
1 parent 7b00096 commit 5aca6ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Marlin/src/libs/vector_3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ struct vector_3 {
7575
vector_3 operator-(const vector_3 &v) { return vector_3(x - v.x, y - v.y, z - v.z); }
7676
vector_3 operator*(const float &v) { return vector_3(x * v, y * v, z * v); }
7777

78-
operator xy_float_t() { return xy_float_t({ x, y }); }
79-
operator xyz_float_t() { return xyz_float_t({ x, y, z }); }
78+
operator xy_float_t() { return xy_float_t({ x OPTARG(HAS_Y_AXIS, y) }); }
79+
operator xyz_float_t() { return xyz_float_t({ x OPTARG(HAS_Y_AXIS, y) OPTARG(HAS_Z_AXIS, z) }); }
8080

8181
void debug(FSTR_P const title);
8282
};

0 commit comments

Comments
 (0)