diff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h
index 04ba5d847b7d..256de1d1c53a 100644
--- a/include/libcamera/internal/vector.h
+++ b/include/libcamera/internal/vector.h
@@ -73,116 +73,116 @@ public:
 
 	constexpr Vector operator+(const Vector &other) const
 	{
-		return apply(*this, other, std::plus<>{});
+		return apply(*this, std::plus<>{}, other);
 	}
 
 	constexpr Vector operator+(T scalar) const
 	{
-		return apply(*this, scalar, std::plus<>{});
+		return apply(*this, std::plus<>{}, scalar);
 	}
 
 	constexpr Vector operator-(const Vector &other) const
 	{
-		return apply(*this, other, std::minus<>{});
+		return apply(*this, std::minus<>{}, other);
 	}
 
 	constexpr Vector operator-(T scalar) const
 	{
-		return apply(*this, scalar, std::minus<>{});
+		return apply(*this, std::minus<>{}, scalar);
 	}
 
 	constexpr Vector operator*(const Vector &other) const
 	{
-		return apply(*this, other, std::multiplies<>{});
+		return apply(*this, std::multiplies<>{}, other);
 	}
 
 	constexpr Vector operator*(T scalar) const
 	{
-		return apply(*this, scalar, std::multiplies<>{});
+		return apply(*this, std::multiplies<>{}, scalar);
 	}
 
 	constexpr Vector operator/(const Vector &other) const
 	{
-		return apply(*this, other, std::divides<>{});
+		return apply(*this, std::divides<>{}, other);
 	}
 
 	constexpr Vector operator/(T scalar) const
 	{
-		return apply(*this, scalar, std::divides<>{});
+		return apply(*this, std::divides<>{}, scalar);
 	}
 
 	constexpr Vector operator>>(unsigned int shift) const
 	{
 		static_assert(std::is_integral_v<T>,
 			      "Vector::operator>> requires an integer element type");
-		return apply(*this, shift, [](T a, unsigned int b) { return a >> b; });
+		return apply(*this, [](T a, unsigned int b) { return a >> b; }, shift);
 	}
 
 	Vector &operator+=(const Vector &other)
 	{
-		return apply(other, [](T a, T b) { return a + b; });
+		return apply([](T a, T b) { return a + b; }, other);
 	}
 
 	Vector &operator+=(T scalar)
 	{
-		return apply(scalar, [](T a, T b) { return a + b; });
+		return apply([](T a, T b) { return a + b; }, scalar);
 	}
 
 	Vector &operator-=(const Vector &other)
 	{
-		return apply(other, [](T a, T b) { return a - b; });
+		return apply([](T a, T b) { return a - b; }, other);
 	}
 
 	Vector &operator-=(T scalar)
 	{
-		return apply(scalar, [](T a, T b) { return a - b; });
+		return apply([](T a, T b) { return a - b; }, scalar);
 	}
 
 	Vector &operator*=(const Vector &other)
 	{
-		return apply(other, [](T a, T b) { return a * b; });
+		return apply([](T a, T b) { return a * b; }, other);
 	}
 
 	Vector &operator*=(T scalar)
 	{
-		return apply(scalar, [](T a, T b) { return a * b; });
+		return apply([](T a, T b) { return a * b; }, scalar);
 	}
 
 	Vector &operator/=(const Vector &other)
 	{
-		return apply(other, [](T a, T b) { return a / b; });
+		return apply([](T a, T b) { return a / b; }, other);
 	}
 
 	Vector &operator/=(T scalar)
 	{
-		return apply(scalar, [](T a, T b) { return a / b; });
+		return apply([](T a, T b) { return a / b; }, scalar);
 	}
 
 	Vector &operator>>=(unsigned int shift)
 	{
 		static_assert(std::is_integral_v<T>,
 			      "Vector::operator>>= requires an integer element type");
-		return apply(shift, [](T a, unsigned int b) { return a >> b; });
+		return apply([](T a, unsigned int b) { return a >> b; }, shift);
 	}
 
 	constexpr Vector min(const Vector &other) const
 	{
-		return apply(*this, other, [](T a, T b) { return std::min(a, b); });
+		return apply(*this, [](T a, T b) { return std::min(a, b); }, other);
 	}
 
 	constexpr Vector min(T scalar) const
 	{
-		return apply(*this, scalar, [](T a, T b) { return std::min(a, b); });
+		return apply(*this, [](T a, T b) { return std::min(a, b); }, scalar);
 	}
 
 	constexpr Vector max(const Vector &other) const
 	{
-		return apply(*this, other, [](T a, T b) { return std::max(a, b); });
+		return apply(*this, [](T a, T b) { return std::max(a, b); }, other);
 	}
 
 	constexpr Vector max(T scalar) const
 	{
-		return apply(*this, scalar, [](T a, T b) -> T { return std::max(a, b); });
+		return apply(*this, [](T a, T b) -> T { return std::max(a, b); }, scalar);
 	}
 
 	constexpr T dot(const Vector<T, Rows> &other) const
@@ -264,7 +264,7 @@ public:
 
 private:
 	template<typename BinaryOp>
-	static constexpr Vector apply(const Vector &lhs, const Vector &rhs, BinaryOp op)
+	static constexpr Vector apply(const Vector &lhs, BinaryOp op, const Vector &rhs)
 	{
 		Vector result;
 		std::transform(lhs.data_.begin(), lhs.data_.end(),
@@ -274,8 +274,8 @@ private:
 		return result;
 	}
 
-	template<typename U, typename BinaryOp>
-	static constexpr Vector apply(const Vector &lhs, U rhs, BinaryOp op)
+	template<typename BinaryOp, typename U>
+	static constexpr Vector apply(const Vector &lhs, BinaryOp op, U rhs)
 	{
 		Vector result;
 		std::transform(lhs.data_.begin(), lhs.data_.end(),
@@ -286,7 +286,7 @@ private:
 	}
 
 	template<typename BinaryOp>
-	Vector &apply(const Vector &other, BinaryOp op)
+	Vector &apply(BinaryOp op, const Vector &other)
 	{
 		auto itOther = other.data_.begin();
 		std::for_each(data_.begin(), data_.end(),
@@ -295,8 +295,8 @@ private:
 		return *this;
 	}
 
-	template<typename U, typename BinaryOp>
-	Vector &apply(U scalar, BinaryOp op)
+	template<typename BinaryOp, typename U>
+	Vector &apply(BinaryOp op, U scalar)
 	{
 		std::for_each(data_.begin(), data_.end(),
 			      [&op, scalar](T &v) { v = op(v, scalar); });
