#include "ui/gfx/geometry/point_f.h"
#include <cmath>
#include "base/check.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/typed_macros.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_IOS)
#include <CoreGraphics/CoreGraphics.h>
#elif BUILDFLAG(IS_MAC)
#include <ApplicationServices/ApplicationServices.h>
#endif
namespace gfx {
#if BUILDFLAG(IS_APPLE)
PointF::PointF(const CGPoint& p) : PointF(p.x, p.y) {}
CGPoint PointF::ToCGPoint() const {
return CGPointMake(x(), y());
}
#endif
void PointF::SetToMin(const PointF& other) { … }
void PointF::SetToMax(const PointF& other) { … }
bool PointF::IsWithinDistance(const PointF& rhs,
const float allowed_distance) const { … }
std::string PointF::ToString() const { … }
void PointF::WriteIntoTrace(perfetto::TracedValue ctx) const { … }
PointF ScalePoint(const PointF& p, float x_scale, float y_scale) { … }
}