10#ifndef UI_GFX_GEOMETRY_VECTOR2D_F_H_
11#define UI_GFX_GEOMETRY_VECTOR2D_F_H_
26 constexpr float x()
const {
return x_; }
29 constexpr float y()
const {
return y_; }
44 x_ = x_ <= other.x_ ? x_ : other.x_;
45 y_ = y_ <= other.y_ ? y_ : other.y_;
49 x_ = x_ >= other.x_ ? x_ : other.x_;
50 y_ = y_ >= other.y_ ? y_ : other.y_;
54 double LengthSquared()
const;
62 void Scale(
float x_scale,
float y_scale);
72 return lhs.
x() == rhs.
x() && lhs.
y() == rhs.
y();
115void PrintTo(
const Vector2dF& vector, ::std::ostream* os);
constexpr float y() const
void operator-=(const Vector2dF &other)
constexpr float x() const
void SetToMax(const Vector2dF &other)
void operator+=(const Vector2dF &other)
void SetToMin(const Vector2dF &other)
constexpr Vector2dF(float x, float y)
bool IsZero(char *begin, char *end)
Insets operator+(Insets lhs, const Insets &rhs)
double DotProduct(const Vector2dF &lhs, const Vector2dF &rhs)
Vector2dF ScaleVector2d(const Vector2dF &v, float x_scale, float y_scale)
void PrintTo(const Point &point, ::std::ostream *os)
Insets operator-(Insets lhs, const Insets &rhs)
bool operator==(const Point &lhs, const Point &rhs)
double CrossProduct(const Vector2dF &lhs, const Vector2dF &rhs)
bool operator!=(const Point &lhs, const Point &rhs)
static std::string ToString(CompilerBackend::Type type)