10#ifndef UI_GFX_GEOMETRY_VECTOR2D_H_
11#define UI_GFX_GEOMETRY_VECTOR2D_H_
27 constexpr int x()
const {
return x_; }
30 constexpr int y()
const {
return y_; }
39 void Subtract(
const Vector2d& other);
42 return x_ == other.x_ && y_ == other.y_;
48 x_ = x_ <= other.x_ ? x_ : other.x_;
49 y_ = y_ <= other.y_ ? y_ : other.y_;
53 x_ = x_ >= other.x_ ? x_ : other.x_;
54 y_ = y_ >= other.y_ ? y_ : other.y_;
60 int64_t LengthSquared()
const;
67 return Vector2dF(
static_cast<float>(
x()),
static_cast<float>(
y()));
94void PrintTo(
const Vector2d& vector, ::std::ostream* os);
constexpr bool operator==(const Vector2d &other) const
constexpr Vector2d(int x, int y)
void SetToMin(const Vector2d &other)
void operator-=(const Vector2d &other)
void SetToMax(const Vector2d &other)
void operator+=(const Vector2d &other)
bool IsZero(char *begin, char *end)
Insets operator+(Insets lhs, const Insets &rhs)
void PrintTo(const Point &point, ::std::ostream *os)
Insets operator-(Insets lhs, const Insets &rhs)
static std::string ToString(CompilerBackend::Type type)