45#ifndef UFO_VISION_COLOR_ARITHMETIC_HPP
46#define UFO_VISION_COLOR_ARITHMETIC_HPP
49#include <ufo/vision/color/concepts.hpp>
50#include <ufo/vision/color/detail/arithmetic.hpp>
77 lhs = detail::reduce(lhs, rhs, std::plus{});
88constexpr C operator+(C lhs, C
const& rhs)
109 lhs = detail::reduce(lhs, rhs, std::minus{});
120constexpr C operator-(C lhs, C
const& rhs)
141 lhs = detail::reduce(lhs, rhs, std::multiplies{});
154 lhs = detail::reduce(lhs, rhs, std::multiplies{});
193 return detail::reduce(lhs, rhs, std::multiplies{});
211 lhs = detail::reduce(lhs, rhs, std::divides{});
224 lhs = detail::reduce(lhs, rhs, std::divides{});
263 return detail::reduce(lhs, rhs, std::divides{});
constexpr C & operator/=(C &lhs, C const &rhs)
Divides a color by another color component-wise.
constexpr C & operator-=(C &lhs, C const &rhs)
Subtracts two colors component-wise.
constexpr C & operator*=(C &lhs, float rhs)
Multiplies a color by a scalar.
constexpr C & operator+=(C &lhs, C const &rhs)
Adds two colors component-wise.
All vision-related classes and functions.
constexpr Mat< Rows, Cols, T > operator*(Mat< Rows, Cols, T > lhs, T rhs) noexcept
Multiplies every element of lhs by scalar rhs.
constexpr Mat< Rows, Cols, T > operator/(Mat< Rows, Cols, T > lhs, T rhs) noexcept
Divides every element of lhs by scalar rhs.